remove IMAP_SMTP_CALDAV feature flag (#16695)

To be merged after 
https://github.com/twentyhq/twenty/pull/16479
https://github.com/twentyhq/twenty/pull/16694
This commit is contained in:
neo773
2025-12-19 22:50:12 +05:30
committed by GitHub
parent 6355557356
commit d30580fc4e
12 changed files with 7 additions and 50 deletions
@@ -12,16 +12,6 @@ export type PublicFeatureFlag = {
};
export const PUBLIC_FEATURE_FLAGS: PublicFeatureFlag[] = [
{
key: FeatureFlagKey.IS_IMAP_SMTP_CALDAV_ENABLED,
metadata: {
label: 'IMAP, SMTP, CalDAV',
description:
'Easily add email accounts from any provider that supports IMAP, send emails with SMTP (and soon, sync calendars with CalDAV)',
imagePath:
'https://twenty.com/images/lab/is-imap-smtp-caldav-enabled.png',
},
},
{
key: FeatureFlagKey.IS_PAGE_LAYOUT_ENABLED,
metadata: {
@@ -6,7 +6,6 @@ export enum FeatureFlagKey {
IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',
IS_AI_ENABLED = 'IS_AI_ENABLED',
IS_APPLICATION_ENABLED = 'IS_APPLICATION_ENABLED',
IS_IMAP_SMTP_CALDAV_ENABLED = 'IS_IMAP_SMTP_CALDAV_ENABLED',
IS_PAGE_LAYOUT_ENABLED = 'IS_PAGE_LAYOUT_ENABLED',
IS_RECORD_PAGE_LAYOUT_ENABLED = 'IS_RECORD_PAGE_LAYOUT_ENABLED',
IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',
@@ -1,10 +1,4 @@
import {
HttpException,
HttpStatus,
UseFilters,
UseGuards,
UsePipes,
} from '@nestjs/common';
import { UseFilters, UseGuards, UsePipes } from '@nestjs/common';
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
import { PermissionFlagType } from 'twenty-shared/constants';
@@ -12,8 +6,6 @@ import { isDefined } from 'twenty-shared/utils';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter';
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 { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe';
import { UserInputError } from 'src/engine/core-modules/graphql/utils/graphql-errors.util';
import { ConnectedImapSmtpCaldavAccountDTO } from 'src/engine/core-modules/imap-smtp-caldav-connection/dtos/imap-smtp-caldav-connected-account.dto';
@@ -36,7 +28,6 @@ export class ImapSmtpCaldavResolver {
constructor(
private readonly ImapSmtpCaldavConnectionService: ImapSmtpCaldavService,
private readonly imapSmtpCaldavApisService: ImapSmtpCalDavAPIService,
private readonly featureFlagService: FeatureFlagService,
private readonly mailConnectionValidatorService: ImapSmtpCaldavValidatorService,
) {}
@@ -78,19 +69,6 @@ export class ImapSmtpCaldavResolver {
@AuthWorkspace() workspace: WorkspaceEntity,
@Args('id', { type: () => UUIDScalarType, nullable: true }) id?: string,
): Promise<ImapSmtpCaldavConnectionSuccessDTO> {
const isImapSmtpCaldavFeatureFlagEnabled =
await this.featureFlagService.isFeatureEnabled(
FeatureFlagKey.IS_IMAP_SMTP_CALDAV_ENABLED,
workspace.id,
);
if (!isImapSmtpCaldavFeatureFlagEnabled) {
throw new HttpException(
'IMAP, SMTP, CalDAV feature is not enabled for this workspace',
HttpStatus.FORBIDDEN,
);
}
const validatedParams = await this.validateAndTestConnectionParameters(
connectionParameters,
handle,
@@ -232,7 +232,6 @@ describe('WorkspaceEntityManager', () => {
IS_JSON_FILTER_ENABLED: false,
IS_AI_ENABLED: false,
IS_APPLICATION_ENABLED: false,
IS_IMAP_SMTP_CALDAV_ENABLED: false,
IS_PAGE_LAYOUT_ENABLED: false,
IS_RECORD_PAGE_LAYOUT_ENABLED: false,
IS_PUBLIC_DOMAIN_ENABLED: false,
@@ -51,11 +51,6 @@ export const seedFeatureFlags = async ({
workspaceId: workspaceId,
value: true,
},
{
key: FeatureFlagKey.IS_IMAP_SMTP_CALDAV_ENABLED,
workspaceId: workspaceId,
value: true,
},
{
key: FeatureFlagKey.IS_PAGE_LAYOUT_ENABLED,
workspaceId: workspaceId,