mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[AC-2285] Edit Unassigned Ciphers in AC Bug (#8410)
* check if cipher is unassigned and call the proper service between cipherService get and apiService get. also check for custom user permissions
This commit is contained in:
@@ -105,8 +105,14 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
}
|
||||
|
||||
protected async loadCipher() {
|
||||
if (!this.organization.canEditAllCiphers(this.flexibleCollectionsV1Enabled)) {
|
||||
return await super.loadCipher();
|
||||
// Calling loadCipher first to assess if the cipher is unassigned. If null use apiService getCipherAdmin
|
||||
const firstCipherCheck = await super.loadCipher();
|
||||
|
||||
if (
|
||||
!this.organization.canEditAllCiphers(this.flexibleCollectionsV1Enabled) &&
|
||||
firstCipherCheck != null
|
||||
) {
|
||||
return firstCipherCheck;
|
||||
}
|
||||
const response = await this.apiService.getCipherAdmin(this.cipherId);
|
||||
const data = new CipherData(response);
|
||||
|
||||
Reference in New Issue
Block a user