mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[AC-2027] Update Flexible Collections logic to use organization property (#7445)
* Remove unused feature flag * Replace feature flag ref with org flag * Remove deprecated feature flag to discourage use * Add check to org.canCreateNewCollections * Adjust init logic of components to avoid race conditions * Make canCreateNewCollections logic more explicit * Resolve merge conflicts with vault changes * Update comments * Remove uses of old feature flag * Remove last of old feature flag * Clean up feature flag * Fix linting * Fix linting
This commit is contained in:
@@ -177,11 +177,15 @@ export class Organization {
|
||||
}
|
||||
|
||||
get canCreateNewCollections() {
|
||||
return (
|
||||
!this.limitCollectionCreationDeletion ||
|
||||
this.isManager ||
|
||||
this.permissions.createNewCollections
|
||||
);
|
||||
if (this.flexibleCollections) {
|
||||
return (
|
||||
!this.limitCollectionCreationDeletion ||
|
||||
this.isAdmin ||
|
||||
this.permissions.createNewCollections
|
||||
);
|
||||
}
|
||||
|
||||
return this.isManager || this.permissions.createNewCollections;
|
||||
}
|
||||
|
||||
get canEditAnyCollection() {
|
||||
|
||||
Reference in New Issue
Block a user