mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[AC-1340] [Defect] Provider users unable to delete vault items for client organizations (#5242)
* [AC-1340] Calling Cipher DeleteAdmin endpoints when user has canEditAnyCollection permission * [AC-1340] Fixed CLI and Desktop builds * [AC-1340] Changed CipherService delete methods parameter 'orgAdmin' to 'asAdmin' and to nullable * [AC-1340] Changed variable names from 'orgAdmin' to 'asAdmin' * [AC-1340] Reverted change on DeleteCommand
This commit is contained in:
@@ -99,10 +99,11 @@ export class BulkDeleteDialogComponent {
|
||||
};
|
||||
|
||||
private async deleteCiphers(): Promise<any> {
|
||||
const asAdmin = this.organization?.canEditAnyCollection;
|
||||
if (this.permanent) {
|
||||
await this.cipherService.deleteManyWithServer(this.cipherIds);
|
||||
await this.cipherService.deleteManyWithServer(this.cipherIds, asAdmin);
|
||||
} else {
|
||||
await this.cipherService.softDeleteManyWithServer(this.cipherIds);
|
||||
await this.cipherService.softDeleteManyWithServer(this.cipherIds, asAdmin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -900,9 +900,10 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
protected deleteCipherWithServer(id: string, permanent: boolean) {
|
||||
const asAdmin = this.organization?.canEditAnyCollection;
|
||||
return permanent
|
||||
? this.cipherService.deleteWithServer(id)
|
||||
: this.cipherService.softDeleteWithServer(id);
|
||||
? this.cipherService.deleteWithServer(id, asAdmin)
|
||||
: this.cipherService.softDeleteWithServer(id, asAdmin);
|
||||
}
|
||||
|
||||
protected async repromptCipher(ciphers: CipherView[]) {
|
||||
|
||||
Reference in New Issue
Block a user