Enable new record board and messaging for all workspaces except demo (#4243)
* Enable new record board and messaging for all workspaces except demo * Fix according to PR
This commit is contained in:
@ -37,14 +37,25 @@ export class GoogleGmailAuthController {
|
||||
const { workspaceMemberId, workspaceId } =
|
||||
await this.tokenService.verifyTransientToken(transientToken);
|
||||
|
||||
await this.googleGmailService.saveConnectedAccount({
|
||||
handle: email,
|
||||
workspaceMemberId: workspaceMemberId,
|
||||
workspaceId: workspaceId,
|
||||
provider: 'gmail',
|
||||
accessToken,
|
||||
refreshToken,
|
||||
});
|
||||
const demoWorkspaceIds = this.environmentService.getDemoWorkspaceIds();
|
||||
|
||||
if (demoWorkspaceIds.includes(workspaceId)) {
|
||||
throw new Error('Cannot connect Gmail account to demo workspace');
|
||||
}
|
||||
|
||||
if (!workspaceId) {
|
||||
throw new Error('Workspace not found');
|
||||
}
|
||||
|
||||
if (workspaceId)
|
||||
await this.googleGmailService.saveConnectedAccount({
|
||||
handle: email,
|
||||
workspaceMemberId: workspaceMemberId,
|
||||
workspaceId: workspaceId,
|
||||
provider: 'gmail',
|
||||
accessToken,
|
||||
refreshToken,
|
||||
});
|
||||
|
||||
return res.redirect(
|
||||
`${this.environmentService.getFrontBaseUrl()}/settings/accounts`,
|
||||
|
||||
@ -16,10 +16,7 @@ import { Workspace } from 'src/core/workspace/workspace.entity';
|
||||
export enum FeatureFlagKeys {
|
||||
IsBlocklistEnabled = 'IS_BLOCKLIST_ENABLED',
|
||||
IsCalendarEnabled = 'IS_CALENDAR_ENABLED',
|
||||
IsMessagingEnabled = 'IS_MESSAGING_ENABLED',
|
||||
IsNewRecordBoardEnabled = 'IS_NEW_RECORD_BOARD_ENABLED',
|
||||
IsSelfBillingEnabled = 'IS_SELF_BILLING_ENABLED',
|
||||
IsWorkspaceCleanable = 'IS_WORKSPACE_CLEANABLE',
|
||||
}
|
||||
|
||||
@Entity({ name: 'featureFlag', schema: 'core' })
|
||||
|
||||
Reference in New Issue
Block a user