mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
[AC-1110] allow members with Delete Any Collection to delete collections (#4925)
* [AC-1110] add anyCollection permission to delete collection * [AC-1110] add missing permission to header collection delete
This commit is contained in:
@@ -116,7 +116,10 @@ export class BulkDeleteDialogComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async deleteCollections(): Promise<any> {
|
private async deleteCollections(): Promise<any> {
|
||||||
if (!this.organization.canDeleteAssignedCollections) {
|
if (
|
||||||
|
!this.organization.canDeleteAssignedCollections &&
|
||||||
|
!this.organization.canDeleteAnyCollection
|
||||||
|
) {
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
this.i18nService.t("errorOccurred"),
|
this.i18nService.t("errorOccurred"),
|
||||||
|
|||||||
@@ -209,7 +209,10 @@ export class VaultHeaderComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteCollection(collection: CollectionView): Promise<void> {
|
async deleteCollection(collection: CollectionView): Promise<void> {
|
||||||
if (!this.organization.canDeleteAssignedCollections) {
|
if (
|
||||||
|
!this.organization.canDeleteAnyCollection &&
|
||||||
|
!this.organization.canDeleteAssignedCollections
|
||||||
|
) {
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
this.i18nService.t("errorOccurred"),
|
this.i18nService.t("errorOccurred"),
|
||||||
|
|||||||
@@ -244,7 +244,10 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteCollection(collection: CollectionView): Promise<void> {
|
async deleteCollection(collection: CollectionView): Promise<void> {
|
||||||
if (!this.organization.canDeleteAssignedCollections) {
|
if (
|
||||||
|
!this.organization.canDeleteAssignedCollections &&
|
||||||
|
!this.organization.canDeleteAnyCollection
|
||||||
|
) {
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
this.i18nService.t("errorOccurred"),
|
this.i18nService.t("errorOccurred"),
|
||||||
@@ -270,6 +273,7 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnDe
|
|||||||
null,
|
null,
|
||||||
this.i18nService.t("deletedCollectionId", collection.name)
|
this.i18nService.t("deletedCollectionId", collection.name)
|
||||||
);
|
);
|
||||||
|
this.actionPromise = null;
|
||||||
await this.refresh();
|
await this.refresh();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user