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;
|
accessSecretsManager: boolean;
|
||||||
limitCollectionCreationDeletion: boolean;
|
limitCollectionCreationDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
|
flexibleCollections: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
response: ProfileOrganizationResponse,
|
response: ProfileOrganizationResponse,
|
||||||
@ -104,6 +105,7 @@ export class OrganizationData {
|
|||||||
this.accessSecretsManager = response.accessSecretsManager;
|
this.accessSecretsManager = response.accessSecretsManager;
|
||||||
this.limitCollectionCreationDeletion = response.limitCollectionCreationDeletion;
|
this.limitCollectionCreationDeletion = response.limitCollectionCreationDeletion;
|
||||||
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
|
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
|
||||||
|
this.flexibleCollections = response.flexibleCollections;
|
||||||
|
|
||||||
this.isMember = options.isMember;
|
this.isMember = options.isMember;
|
||||||
this.isProviderUser = options.isProviderUser;
|
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
|
* Refers to the ability for an owner/admin to access all collection items, regardless of assigned collections
|
||||||
*/
|
*/
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
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) {
|
constructor(obj?: OrganizationData) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
@ -125,6 +130,7 @@ export class Organization {
|
|||||||
this.accessSecretsManager = obj.accessSecretsManager;
|
this.accessSecretsManager = obj.accessSecretsManager;
|
||||||
this.limitCollectionCreationDeletion = obj.limitCollectionCreationDeletion;
|
this.limitCollectionCreationDeletion = obj.limitCollectionCreationDeletion;
|
||||||
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
|
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
|
||||||
|
this.flexibleCollections = obj.flexibleCollections;
|
||||||
}
|
}
|
||||||
|
|
||||||
get canAccess() {
|
get canAccess() {
|
||||||
|
@ -34,6 +34,7 @@ export class OrganizationResponse extends BaseResponse {
|
|||||||
maxAutoscaleSmServiceAccounts?: number;
|
maxAutoscaleSmServiceAccounts?: number;
|
||||||
limitCollectionCreationDeletion: boolean;
|
limitCollectionCreationDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
|
flexibleCollections: boolean;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
super(response);
|
super(response);
|
||||||
@ -75,5 +76,6 @@ export class OrganizationResponse extends BaseResponse {
|
|||||||
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
||||||
"AllowAdminAccessToAllCollectionItems",
|
"AllowAdminAccessToAllCollectionItems",
|
||||||
);
|
);
|
||||||
|
this.flexibleCollections = this.getResponseProperty("FlexibleCollections");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
|||||||
accessSecretsManager: boolean;
|
accessSecretsManager: boolean;
|
||||||
limitCollectionCreationDeletion: boolean;
|
limitCollectionCreationDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
|
flexibleCollections: boolean;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
super(response);
|
super(response);
|
||||||
@ -113,5 +114,6 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
|||||||
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
||||||
"AllowAdminAccessToAllCollectionItems",
|
"AllowAdminAccessToAllCollectionItems",
|
||||||
);
|
);
|
||||||
|
this.flexibleCollections = this.getResponseProperty("FlexibleCollections");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user