mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[PM-11162] Assign To Collections Permission Update (#11367)
Only users with Manage/Edit permissions will be allowed to Assign To Collections. If the user has Can Edit Except Password the collections dropdown will be disabled. --------- Co-authored-by: Matt Bishop <mbishop@bitwarden.com> Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
This commit is contained in:
@@ -42,6 +42,7 @@ export class VaultCipherRowComponent implements OnInit {
|
||||
@Input() collections: CollectionView[];
|
||||
@Input() viewingOrgVault: boolean;
|
||||
@Input() canEditCipher: boolean;
|
||||
@Input() canAssignCollections: boolean;
|
||||
@Input() canManageCollection: boolean;
|
||||
|
||||
@Output() onEvent = new EventEmitter<VaultItemEvent>();
|
||||
@@ -101,7 +102,7 @@ export class VaultCipherRowComponent implements OnInit {
|
||||
}
|
||||
|
||||
protected get showAssignToCollections() {
|
||||
return this.organizations?.length && this.canEditCipher && !this.cipher.isDeleted;
|
||||
return this.organizations?.length && this.canAssignCollections && !this.cipher.isDeleted;
|
||||
}
|
||||
|
||||
protected get showClone() {
|
||||
@@ -208,6 +209,6 @@ export class VaultCipherRowComponent implements OnInit {
|
||||
return true; // Always show checkbox in individual vault or for non-org items
|
||||
}
|
||||
|
||||
return this.organization.canEditAllCiphers || this.cipher.edit;
|
||||
return this.organization.canEditAllCiphers || (this.cipher.edit && this.cipher.viewPassword);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user