Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Error403 from '../../errors/Error403'
import isFeatureEnabled from '../../feature-flags/isFeatureEnabled'
import Permissions from '../../security/permissions'
import ConversationService from '../../services/conversationService'
import PermissionChecker from '../../services/user/permissionChecker'
import { FeatureFlag } from '../../types/common'

export default async (req, res) => {
new PermissionChecker(req).validateHas(Permissions.values.conversationEdit)

if (req.body.customUrl && !(await isFeatureEnabled(FeatureFlag.COMMUNITY_HELP_CENTER_PRO, req))) {
if (req.body.customUrl) {
await req.responseHandler.error(
req,
res,
Expand Down
45 changes: 0 additions & 45 deletions backend/src/bin/scripts/unleash-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,6 @@ const constaintConfiguration = {
},
],
],
[FeatureFlag.COMMUNITY_HELP_CENTER_PRO]: [
[
{
values: [Plans.values.growth],
inverted: false,
operator: 'IN',
contextName: 'plan',
caseInsensitive: false,
},
],
],
[FeatureFlag.CSV_EXPORT]: [
[
{
Expand Down Expand Up @@ -197,23 +186,6 @@ const constaintConfiguration = {
caseInsensitive: false,
},
],
[
{
values: [Plans.values.essential],
inverted: false,
operator: 'IN',
contextName: 'plan',
caseInsensitive: false,
},
{
value: PLAN_LIMITS[Plans.values.essential][FeatureFlag.MEMBER_ENRICHMENT].toString(),
values: [],
inverted: false,
operator: 'NUM_LT',
contextName: 'memberEnrichmentCount',
caseInsensitive: false,
},
],
],
[FeatureFlag.ORGANIZATION_ENRICHMENT]: [
[
Expand Down Expand Up @@ -250,23 +222,6 @@ const constaintConfiguration = {
caseInsensitive: false,
},
],
[
{
values: [Plans.values.essential],
inverted: false,
operator: 'IN',
contextName: 'plan',
caseInsensitive: false,
},
{
value: PLAN_LIMITS[Plans.values.essential][FeatureFlag.ORGANIZATION_ENRICHMENT].toString(),
values: [],
inverted: false,
operator: 'NUM_LT',
contextName: 'organizationEnrichmentCount',
caseInsensitive: false,
},
],
],
[FeatureFlag.SEGMENTS]: [],
}
Expand Down
10 changes: 4 additions & 6 deletions backend/src/feature-flags/isFeatureEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export const PLAN_LIMITS = {
[Plans.values.essential]: {
[FeatureFlag.AUTOMATIONS]: 2,
[FeatureFlag.CSV_EXPORT]: 2,
[FeatureFlag.MEMBER_ENRICHMENT]: 5,
[FeatureFlag.ORGANIZATION_ENRICHMENT]: 5,
},
[Plans.values.growth]: {
[FeatureFlag.AUTOMATIONS]: 10,
Expand All @@ -19,10 +17,10 @@ export const PLAN_LIMITS = {
[FeatureFlag.ORGANIZATION_ENRICHMENT]: 200,
},
[Plans.values.scale]: {
[FeatureFlag.AUTOMATIONS]: 100,
[FeatureFlag.CSV_EXPORT]: 100,
[FeatureFlag.MEMBER_ENRICHMENT]: 10000,
[FeatureFlag.ORGANIZATION_ENRICHMENT]: 2000,
[FeatureFlag.AUTOMATIONS]: 20,
[FeatureFlag.CSV_EXPORT]: 20,
[FeatureFlag.MEMBER_ENRICHMENT]: Infinity,
[FeatureFlag.ORGANIZATION_ENRICHMENT]: Infinity,
},
[Plans.values.enterprise]: {
[FeatureFlag.AUTOMATIONS]: Infinity,
Expand Down
1 change: 0 additions & 1 deletion backend/src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface SearchCriteria {

export enum FeatureFlag {
AUTOMATIONS = 'automations',
COMMUNITY_HELP_CENTER_PRO = 'community-help-center-pro',
EAGLE_EYE = 'eagle-eye',
CSV_EXPORT = 'csv-export',
LINKEDIN = 'linkedin',
Expand Down