1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-30 04:28:19 +02:00

[PM-6645] Update canAccessOrgAdmin helper to consider disabled organizations and owners explicitly (#8220)

This commit is contained in:
Shane Melton 2024-03-06 08:03:52 -08:00 committed by GitHub
parent e2a543506a
commit 940fd21ac4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,10 @@ export function canAccessBillingTab(org: Organization): boolean {
}
export function canAccessOrgAdmin(org: Organization): boolean {
// Admin console can only be accessed by Owners for disabled organizations
if (!org.enabled && !org.isOwner) {
return false;
}
return (
canAccessMembersTab(org) ||
canAccessGroupsTab(org) ||