mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
Add organization.flexibleCollections to models (#7442)
This commit is contained in:
parent
a572e4119e
commit
1f57244d1a
@ -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;
|
||||
|
@ -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() {
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user