mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[PM-11360] Remove export permission for providers (#12062)
* Split organization.canAccessImportExport * Fix import permission to include CanCreateNewCollections * Remove provider export permission (feature flagged)
This commit is contained in:
@@ -168,8 +168,27 @@ export class Organization {
|
||||
return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;
|
||||
}
|
||||
|
||||
get canAccessImportExport() {
|
||||
return this.isAdmin || this.permissions.accessImportExport;
|
||||
get canAccessImport() {
|
||||
return (
|
||||
this.isProviderUser ||
|
||||
this.type === OrganizationUserType.Owner ||
|
||||
this.type === OrganizationUserType.Admin ||
|
||||
this.permissions.accessImportExport ||
|
||||
this.canCreateNewCollections // To allow users to create collections and then import into them
|
||||
);
|
||||
}
|
||||
|
||||
canAccessExport(removeProviderExport: boolean) {
|
||||
if (!removeProviderExport && this.isProviderUser) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
this.isMember &&
|
||||
(this.type === OrganizationUserType.Owner ||
|
||||
this.type === OrganizationUserType.Admin ||
|
||||
this.permissions.accessImportExport)
|
||||
);
|
||||
}
|
||||
|
||||
get canAccessReports() {
|
||||
|
||||
Reference in New Issue
Block a user