1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-02 13:23:29 +01: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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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
); );
} }