mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[PM-21719] Remove Assign To Collections Modal When No Editable Collections (#15137)
* remove assign to collections option when user does not have editable collections
This commit is contained in:
@@ -298,8 +298,11 @@ export class VaultItemsComponent {
|
||||
|
||||
protected canAssignCollections(cipher: CipherView) {
|
||||
const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);
|
||||
const editableCollections = this.allCollections.filter((c) => !c.readOnly);
|
||||
|
||||
return (
|
||||
(organization?.canEditAllCiphers && this.viewingOrgVault) || cipher.canAssignToCollections
|
||||
(organization?.canEditAllCiphers && this.viewingOrgVault) ||
|
||||
(cipher.canAssignToCollections && editableCollections.length > 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user