1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-01 13:13:36 +01:00

[EC-646] Re-introduce the canAccessManageTab helper

This commit is contained in:
Shane Melton 2022-10-27 13:37:30 -07:00
parent 8176b9a980
commit b4b51e1d60
No known key found for this signature in database

View File

@ -24,6 +24,20 @@ export function canAccessBillingTab(org: Organization): boolean {
return org.canManageBilling; return org.canManageBilling;
} }
export function canManageCollections(org: Organization): boolean {
return (
org.canCreateNewCollections ||
org.canEditAnyCollection ||
org.canDeleteAnyCollection ||
org.canEditAssignedCollections ||
org.canDeleteAssignedCollections
);
}
export function canAccessManageTab(org: Organization): boolean {
return canAccessMembersTab(org) || canAccessGroupsTab(org) || canManageCollections(org);
}
export function canAccessOrgAdmin(org: Organization): boolean { export function canAccessOrgAdmin(org: Organization): boolean {
return ( return (
canAccessMembersTab(org) || canAccessMembersTab(org) ||