mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[pm-17363] Add LimitItemDeletion property to models (#13087)
This commit is contained in:
@@ -53,6 +53,7 @@ describe("ORGANIZATIONS state", () => {
|
|||||||
accessSecretsManager: false,
|
accessSecretsManager: false,
|
||||||
limitCollectionCreation: false,
|
limitCollectionCreation: false,
|
||||||
limitCollectionDeletion: false,
|
limitCollectionDeletion: false,
|
||||||
|
limitItemDeletion: false,
|
||||||
allowAdminAccessToAllCollectionItems: false,
|
allowAdminAccessToAllCollectionItems: false,
|
||||||
familySponsorshipLastSyncDate: new Date(),
|
familySponsorshipLastSyncDate: new Date(),
|
||||||
userIsManagedByOrganization: false,
|
userIsManagedByOrganization: false,
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export class OrganizationData {
|
|||||||
accessSecretsManager: boolean;
|
accessSecretsManager: boolean;
|
||||||
limitCollectionCreation: boolean;
|
limitCollectionCreation: boolean;
|
||||||
limitCollectionDeletion: boolean;
|
limitCollectionDeletion: boolean;
|
||||||
|
limitItemDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
userIsManagedByOrganization: boolean;
|
userIsManagedByOrganization: boolean;
|
||||||
useRiskInsights: boolean;
|
useRiskInsights: boolean;
|
||||||
@@ -117,6 +118,7 @@ export class OrganizationData {
|
|||||||
this.accessSecretsManager = response.accessSecretsManager;
|
this.accessSecretsManager = response.accessSecretsManager;
|
||||||
this.limitCollectionCreation = response.limitCollectionCreation;
|
this.limitCollectionCreation = response.limitCollectionCreation;
|
||||||
this.limitCollectionDeletion = response.limitCollectionDeletion;
|
this.limitCollectionDeletion = response.limitCollectionDeletion;
|
||||||
|
this.limitItemDeletion = response.limitItemDeletion;
|
||||||
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
|
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
|
||||||
this.userIsManagedByOrganization = response.userIsManagedByOrganization;
|
this.userIsManagedByOrganization = response.userIsManagedByOrganization;
|
||||||
this.useRiskInsights = response.useRiskInsights;
|
this.useRiskInsights = response.useRiskInsights;
|
||||||
|
|||||||
@@ -76,6 +76,12 @@ 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
|
||||||
*/
|
*/
|
||||||
|
limitItemDeletion: boolean;
|
||||||
|
/**
|
||||||
|
* Refers to the ability to limit delete permission of collection items.
|
||||||
|
* If set to true, members can only delete items when they have a Can Manage permission over the collection.
|
||||||
|
* If set to false, members can delete items when they have a Can Manage OR Can Edit permission over the collection.
|
||||||
|
*/
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
/**
|
/**
|
||||||
* Indicates if this organization manages the user.
|
* Indicates if this organization manages the user.
|
||||||
@@ -138,6 +144,7 @@ export class Organization {
|
|||||||
this.accessSecretsManager = obj.accessSecretsManager;
|
this.accessSecretsManager = obj.accessSecretsManager;
|
||||||
this.limitCollectionCreation = obj.limitCollectionCreation;
|
this.limitCollectionCreation = obj.limitCollectionCreation;
|
||||||
this.limitCollectionDeletion = obj.limitCollectionDeletion;
|
this.limitCollectionDeletion = obj.limitCollectionDeletion;
|
||||||
|
this.limitItemDeletion = obj.limitItemDeletion;
|
||||||
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
|
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
|
||||||
this.userIsManagedByOrganization = obj.userIsManagedByOrganization;
|
this.userIsManagedByOrganization = obj.userIsManagedByOrganization;
|
||||||
this.useRiskInsights = obj.useRiskInsights;
|
this.useRiskInsights = obj.useRiskInsights;
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
export class OrganizationCollectionManagementUpdateRequest {
|
export class OrganizationCollectionManagementUpdateRequest {
|
||||||
limitCollectionCreation: boolean;
|
limitCollectionCreation: boolean;
|
||||||
limitCollectionDeletion: boolean;
|
limitCollectionDeletion: boolean;
|
||||||
|
limitItemDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export class OrganizationResponse extends BaseResponse {
|
|||||||
maxAutoscaleSmServiceAccounts?: number;
|
maxAutoscaleSmServiceAccounts?: number;
|
||||||
limitCollectionCreation: boolean;
|
limitCollectionCreation: boolean;
|
||||||
limitCollectionDeletion: boolean;
|
limitCollectionDeletion: boolean;
|
||||||
|
limitItemDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
useRiskInsights: boolean;
|
useRiskInsights: boolean;
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@ export class OrganizationResponse extends BaseResponse {
|
|||||||
this.maxAutoscaleSmServiceAccounts = this.getResponseProperty("MaxAutoscaleSmServiceAccounts");
|
this.maxAutoscaleSmServiceAccounts = this.getResponseProperty("MaxAutoscaleSmServiceAccounts");
|
||||||
this.limitCollectionCreation = this.getResponseProperty("LimitCollectionCreation");
|
this.limitCollectionCreation = this.getResponseProperty("LimitCollectionCreation");
|
||||||
this.limitCollectionDeletion = this.getResponseProperty("LimitCollectionDeletion");
|
this.limitCollectionDeletion = this.getResponseProperty("LimitCollectionDeletion");
|
||||||
|
this.limitItemDeletion = this.getResponseProperty("LimitItemDeletion");
|
||||||
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
||||||
"AllowAdminAccessToAllCollectionItems",
|
"AllowAdminAccessToAllCollectionItems",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
|||||||
accessSecretsManager: boolean;
|
accessSecretsManager: boolean;
|
||||||
limitCollectionCreation: boolean;
|
limitCollectionCreation: boolean;
|
||||||
limitCollectionDeletion: boolean;
|
limitCollectionDeletion: boolean;
|
||||||
|
limitItemDeletion: boolean;
|
||||||
allowAdminAccessToAllCollectionItems: boolean;
|
allowAdminAccessToAllCollectionItems: boolean;
|
||||||
userIsManagedByOrganization: boolean;
|
userIsManagedByOrganization: boolean;
|
||||||
useRiskInsights: boolean;
|
useRiskInsights: boolean;
|
||||||
@@ -114,6 +115,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
|||||||
this.accessSecretsManager = this.getResponseProperty("AccessSecretsManager");
|
this.accessSecretsManager = this.getResponseProperty("AccessSecretsManager");
|
||||||
this.limitCollectionCreation = this.getResponseProperty("LimitCollectionCreation");
|
this.limitCollectionCreation = this.getResponseProperty("LimitCollectionCreation");
|
||||||
this.limitCollectionDeletion = this.getResponseProperty("LimitCollectionDeletion");
|
this.limitCollectionDeletion = this.getResponseProperty("LimitCollectionDeletion");
|
||||||
|
this.limitItemDeletion = this.getResponseProperty("LimitItemDeletion");
|
||||||
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
||||||
"AllowAdminAccessToAllCollectionItems",
|
"AllowAdminAccessToAllCollectionItems",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ describe("KeyConnectorService", () => {
|
|||||||
accessSecretsManager: false,
|
accessSecretsManager: false,
|
||||||
limitCollectionCreation: true,
|
limitCollectionCreation: true,
|
||||||
limitCollectionDeletion: true,
|
limitCollectionDeletion: true,
|
||||||
|
limitItemDeletion: true,
|
||||||
allowAdminAccessToAllCollectionItems: true,
|
allowAdminAccessToAllCollectionItems: true,
|
||||||
flexibleCollections: false,
|
flexibleCollections: false,
|
||||||
object: "profileOrganization",
|
object: "profileOrganization",
|
||||||
|
|||||||
Reference in New Issue
Block a user