1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

fix: createNewCollections should not grant access to AC (#12142)

This commit is contained in:
Thomas Rittson
2024-11-27 20:44:29 +10:00
committed by GitHub
parent 35764b53dc
commit 5a6d5f5887

View File

@@ -164,13 +164,17 @@ export class Organization {
return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents; return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;
} }
/**
* Returns true if the user can access the Import page in the Admin Console.
* Note: this does not affect user access to the Import page in Password Manager, which can also be used to import
* into organization collections.
*/
get canAccessImport() { get canAccessImport() {
return ( return (
this.isProviderUser || this.isProviderUser ||
this.type === OrganizationUserType.Owner || this.type === OrganizationUserType.Owner ||
this.type === OrganizationUserType.Admin || this.type === OrganizationUserType.Admin ||
this.permissions.accessImportExport || this.permissions.accessImportExport
this.canCreateNewCollections // To allow users to create collections and then import into them
); );
} }