The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
quick fix for microsoft : removing feature flag for microsoft (#9926)
Guillima039987549ad
diff --git a/packages/twenty-server/src/engine/core-modules/auth/guards/microsoft-apis-oauth-request-code.guard.ts b/packages/twenty-server/src/engine/core-modules/auth/guards/microsoft-apis-oauth-request-code.guard.tsindex 6c309ef39b1..c74e9842707 100644--- a/packages/twenty-server/src/engine/core-modules/auth/guards/microsoft-apis-oauth-request-code.guard.ts+++ b/packages/twenty-server/src/engine/core-modules/auth/guards/microsoft-apis-oauth-request-code.guard.ts@@ -4,18 +4,13 @@ import { InjectRepository } from '@nestjs/typeorm';import { Repository } from 'typeorm';-import {- AuthException,- AuthExceptionCode,-} from 'src/engine/core-modules/auth/auth.exception';import { MicrosoftAPIsOauthRequestCodeStrategy } from 'src/engine/core-modules/auth/strategies/microsoft-apis-oauth-request-code.auth.strategy';import { TransientTokenService } from 'src/engine/core-modules/auth/token/services/transient-token.service';import { setRequestExtraParams } from 'src/engine/core-modules/auth/utils/google-apis-set-request-extra-params.util';import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';-import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';-import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';import { GuardRedirectService } from 'src/engine/core-modules/guard-redirect/services/guard-redirect.service';+import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';@Injectable()export class MicrosoftAPIsOauthRequestCodeGuard extends AuthGuard(@@ -49,19 +44,6 @@ export class MicrosoftAPIsOauthRequestCodeGuard extends AuthGuard(id: workspaceId,});- const isMicrosoftSyncEnabled =- await this.featureFlagService.isFeatureEnabled(- FeatureFlagKey.IsMicrosoftSyncEnabled,- workspaceId,- );-- if (!isMicrosoftSyncEnabled) {- throw new AuthException(- 'Microsoft sync is not enabled',- AuthExceptionCode.FORBIDDEN_EXCEPTION,- );- }-new MicrosoftAPIsOauthRequestCodeStrategy(this.environmentService);setRequestExtraParams(request, {transientToken: request.query.transientToken,