mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
[AC-1529] Update settings tab visibility to include device approvals (#5855)
* fix: update show org settings function, add explicit canManageDeviceApprovals helper, refs AC-1529 * fix: add device approval in org-redirect guard and update passed permission, refs AC-1529
This commit is contained in:
parent
7f4741f464
commit
15597fb4e9
@ -70,6 +70,9 @@ function getSettingsRoute(organization: Organization) {
|
||||
if (organization.canManageScim) {
|
||||
return "scim";
|
||||
}
|
||||
if (organization.canManageDeviceApprovals) {
|
||||
return "device-approvals";
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
routerLink="device-approvals"
|
||||
class="list-group-item"
|
||||
routerLinkActive="active"
|
||||
*ngIf="org.canManageUsersPassword"
|
||||
*ngIf="org.canManageDeviceApprovals"
|
||||
>
|
||||
{{ "deviceApprovals" | i18n }}
|
||||
</a>
|
||||
|
@ -62,7 +62,7 @@ const routes: Routes = [
|
||||
canAccessFeature(FeatureFlag.TrustedDeviceEncryption),
|
||||
],
|
||||
data: {
|
||||
organizationPermissions: (org: Organization) => org.canManageUsersPassword,
|
||||
organizationPermissions: (org: Organization) => org.canManageDeviceApprovals,
|
||||
titleId: "deviceApprovals",
|
||||
},
|
||||
},
|
||||
|
@ -15,7 +15,8 @@ export function canAccessSettingsTab(org: Organization): boolean {
|
||||
org.canManagePolicies ||
|
||||
org.canManageSso ||
|
||||
org.canManageScim ||
|
||||
org.canAccessImportExport
|
||||
org.canAccessImportExport ||
|
||||
org.canManageDeviceApprovals
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,10 @@ export class Organization {
|
||||
return this.isAdmin || this.permissions.manageResetPassword;
|
||||
}
|
||||
|
||||
get canManageDeviceApprovals() {
|
||||
return (this.isAdmin || this.permissions.manageResetPassword) && this.useSso;
|
||||
}
|
||||
|
||||
get isExemptFromPolicies() {
|
||||
return this.canManagePolicies;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user