1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[EC-678] [EC-673] Fix active tab not showing selected while in child route (#3964)

* [PS-1114] hide reporting sidebar if only events

* [PS-1114] add orgRedirectGuard

* [PS-1114] highlight tabs based on route subset

* [PS-1114] redirect to correct child route on tab
- Use new OrgRedirectGuard

* [PS-1114] add settings redirect using guard
- refactored guard to accept array of strings

* [EC-678] [EC-673] remove remaining methods

* [EC-678][EC-673] address PR feedback
- change switch to if statements
- remove ternary
This commit is contained in:
Jake Fink
2022-11-07 09:21:16 -05:00
committed by GitHub
parent 4afe0f5d89
commit 6f4771da6c
11 changed files with 129 additions and 33 deletions

View File

@@ -9,7 +9,13 @@ export function canAccessVaultTab(org: Organization): boolean {
}
export function canAccessSettingsTab(org: Organization): boolean {
return org.isOwner;
return (
org.isOwner ||
org.canManagePolicies ||
org.canManageSso ||
org.canManageScim ||
org.canAccessImportExport
);
}
export function canAccessMembersTab(org: Organization): boolean {