diff --git a/libs/common/src/admin-console/models/data/organization.data.ts b/libs/common/src/admin-console/models/data/organization.data.ts index 50b94e2acc6..512b25178b1 100644 --- a/libs/common/src/admin-console/models/data/organization.data.ts +++ b/libs/common/src/admin-console/models/data/organization.data.ts @@ -51,6 +51,7 @@ export class OrganizationData { accessSecretsManager: boolean; limitCollectionCreationDeletion: boolean; allowAdminAccessToAllCollectionItems: boolean; + flexibleCollections: boolean; constructor( response: ProfileOrganizationResponse, @@ -104,6 +105,7 @@ export class OrganizationData { this.accessSecretsManager = response.accessSecretsManager; this.limitCollectionCreationDeletion = response.limitCollectionCreationDeletion; this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems; + this.flexibleCollections = response.flexibleCollections; this.isMember = options.isMember; this.isProviderUser = options.isProviderUser; diff --git a/libs/common/src/admin-console/models/domain/organization.ts b/libs/common/src/admin-console/models/domain/organization.ts index 056c9141a2f..16b5cf37130 100644 --- a/libs/common/src/admin-console/models/domain/organization.ts +++ b/libs/common/src/admin-console/models/domain/organization.ts @@ -72,6 +72,11 @@ export class Organization { * Refers to the ability for an owner/admin to access all collection items, regardless of assigned collections */ allowAdminAccessToAllCollectionItems: boolean; + /** + * Returns true if this organization has enabled Flexible Collections (MVP) and their data has been migrated. + * Generally, you should use this as the feature flag to gate Flexible Collections features. + */ + flexibleCollections: boolean; constructor(obj?: OrganizationData) { if (obj == null) { @@ -125,6 +130,7 @@ export class Organization { this.accessSecretsManager = obj.accessSecretsManager; this.limitCollectionCreationDeletion = obj.limitCollectionCreationDeletion; this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems; + this.flexibleCollections = obj.flexibleCollections; } get canAccess() { diff --git a/libs/common/src/admin-console/models/response/organization.response.ts b/libs/common/src/admin-console/models/response/organization.response.ts index b47aecf4537..3e05c9110a5 100644 --- a/libs/common/src/admin-console/models/response/organization.response.ts +++ b/libs/common/src/admin-console/models/response/organization.response.ts @@ -34,6 +34,7 @@ export class OrganizationResponse extends BaseResponse { maxAutoscaleSmServiceAccounts?: number; limitCollectionCreationDeletion: boolean; allowAdminAccessToAllCollectionItems: boolean; + flexibleCollections: boolean; constructor(response: any) { super(response); @@ -75,5 +76,6 @@ export class OrganizationResponse extends BaseResponse { this.allowAdminAccessToAllCollectionItems = this.getResponseProperty( "AllowAdminAccessToAllCollectionItems", ); + this.flexibleCollections = this.getResponseProperty("FlexibleCollections"); } } diff --git a/libs/common/src/admin-console/models/response/profile-organization.response.ts b/libs/common/src/admin-console/models/response/profile-organization.response.ts index 2d8802f0da7..9092d48c774 100644 --- a/libs/common/src/admin-console/models/response/profile-organization.response.ts +++ b/libs/common/src/admin-console/models/response/profile-organization.response.ts @@ -50,6 +50,7 @@ export class ProfileOrganizationResponse extends BaseResponse { accessSecretsManager: boolean; limitCollectionCreationDeletion: boolean; allowAdminAccessToAllCollectionItems: boolean; + flexibleCollections: boolean; constructor(response: any) { super(response); @@ -113,5 +114,6 @@ export class ProfileOrganizationResponse extends BaseResponse { this.allowAdminAccessToAllCollectionItems = this.getResponseProperty( "AllowAdminAccessToAllCollectionItems", ); + this.flexibleCollections = this.getResponseProperty("FlexibleCollections"); } }