diff --git a/src/app/organizations/vault/ciphers.component.ts b/src/app/organizations/vault/ciphers.component.ts index 8f3561518f..bae26e3ba3 100644 --- a/src/app/organizations/vault/ciphers.component.ts +++ b/src/app/organizations/vault/ciphers.component.ts @@ -76,4 +76,11 @@ export class CiphersComponent extends BaseCiphersComponent { events(c: CipherView) { this.onEventsClicked.emit(c); } + + protected deleteCipher(id: string) { + if (!this.organization.isAdmin) { + return super.deleteCipher(id); + } + return this.apiService.deleteCipherAdmin(id); + } } diff --git a/src/app/organizations/vault/collections.component.ts b/src/app/organizations/vault/collections.component.ts index 671c45acfc..10abc41b20 100644 --- a/src/app/organizations/vault/collections.component.ts +++ b/src/app/organizations/vault/collections.component.ts @@ -51,7 +51,11 @@ export class CollectionsComponent extends BaseCollectionsComponent { } protected saveCollections() { - const request = new CipherCollectionsRequest(this.cipherDomain.collectionIds); - return this.apiService.putCipherCollectionsAdmin(this.cipherId, request); + if (this.organization.isAdmin) { + const request = new CipherCollectionsRequest(this.cipherDomain.collectionIds); + return this.apiService.putCipherCollectionsAdmin(this.cipherId, request); + } else { + return super.saveCollections(); + } } } diff --git a/src/app/organizations/vault/vault.component.html b/src/app/organizations/vault/vault.component.html index 29c8cab587..ecc138fbf4 100644 --- a/src/app/organizations/vault/vault.component.html +++ b/src/app/organizations/vault/vault.component.html @@ -7,7 +7,12 @@