mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PM-12273] use organization properties for access permissions (#12358)
* use organization properties for access permissions * clean up refactor * simplify logic * refactor canAccessIntegrationEditor to have all the permission checks
This commit is contained in:
@@ -360,4 +360,15 @@ export class Organization {
|
||||
familySponsorshipValidUntil: new Date(json.familySponsorshipValidUntil),
|
||||
});
|
||||
}
|
||||
|
||||
get canAccessIntegrations() {
|
||||
return (
|
||||
(this.productTierType === ProductTierType.Teams ||
|
||||
this.productTierType === ProductTierType.Enterprise) &&
|
||||
(this.isAdmin ||
|
||||
this.permissions.manageUsers ||
|
||||
this.permissions.manageGroups ||
|
||||
this.permissions.accessEventLogs)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user