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
15 changes: 9 additions & 6 deletions controlplane/src/core/repositories/OrganizationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
users,
} from '../../db/schema.js';
import {
COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID,
Feature,
FeatureIds,
OrganizationDTO,
Expand Down Expand Up @@ -1405,16 +1406,18 @@ export class OrganizationRepository {
plugins: 0,
users: 25,
requests: 30,
rbac: false,
sso: false,
security: false,
support: false,
oidc: false,
// Boolean features
ai: false,
scim: false,
[COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID]: false,
'cache-warmer': false,
oidc: false,
proposals: false,
rbac: false,
scim: false,
security: false,
sso: false,
'subgraph-check-extensions': false,
support: false,
};

for (const feature of features) {
Expand Down
21 changes: 12 additions & 9 deletions controlplane/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { JWTPayload } from 'jose';
import { DBSubgraphType, GraphPruningRuleEnum, OrganizationRole, ProposalMatch, ProposalOrigin } from '../db/models.js';
import { RBACEvaluator } from '../core/services/RBACEvaluator.js';

export const COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID = 'composition-ignore-external-keys';

export type FeatureIds =
| 'users'
| 'federated-graphs'
Expand All @@ -14,18 +16,19 @@ export type FeatureIds =
| 'requests'
| 'feature-flags'
// Boolean features
| 'rbac'
| 'sso'
| 'security'
| 'support'
| 'ai'
| 'oidc'
| 'scim'
| 'field-pruning-grace-period'
| 'cache-warmer'
| 'proposals'
| 'composition-ignore-external-keys' // COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID
| 'field-pruning-grace-period'
| 'oidc'
| 'plugins'
| 'subgraph-check-extensions';
| 'proposals'
| 'rbac'
| 'scim'
| 'security'
| 'sso'
| 'subgraph-check-extensions'
| 'support';

export type Features = {
[key in FeatureIds]: Feature;
Expand Down
Loading