[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) {
|
if (organization.canManageScim) {
|
||||||
return "scim";
|
return "scim";
|
||||||
}
|
}
|
||||||
|
if (organization.canManageDeviceApprovals) {
|
||||||
|
return "device-approvals";
|
||||||
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
routerLink="device-approvals"
|
routerLink="device-approvals"
|
||||||
class="list-group-item"
|
class="list-group-item"
|
||||||
routerLinkActive="active"
|
routerLinkActive="active"
|
||||||
*ngIf="org.canManageUsersPassword"
|
*ngIf="org.canManageDeviceApprovals"
|
||||||
>
|
>
|
||||||
{{ "deviceApprovals" | i18n }}
|
{{ "deviceApprovals" | i18n }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -62,7 +62,7 @@ const routes: Routes = [
|
||||||
canAccessFeature(FeatureFlag.TrustedDeviceEncryption),
|
canAccessFeature(FeatureFlag.TrustedDeviceEncryption),
|
||||||
],
|
],
|
||||||
data: {
|
data: {
|
||||||
organizationPermissions: (org: Organization) => org.canManageUsersPassword,
|
organizationPermissions: (org: Organization) => org.canManageDeviceApprovals,
|
||||||
titleId: "deviceApprovals",
|
titleId: "deviceApprovals",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,8 @@ export function canAccessSettingsTab(org: Organization): boolean {
|
||||||
org.canManagePolicies ||
|
org.canManagePolicies ||
|
||||||
org.canManageSso ||
|
org.canManageSso ||
|
||||||
org.canManageScim ||
|
org.canManageScim ||
|
||||||
org.canAccessImportExport
|
org.canAccessImportExport ||
|
||||||
|
org.canManageDeviceApprovals
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,10 @@ export class Organization {
|
||||||
return this.isAdmin || this.permissions.manageResetPassword;
|
return this.isAdmin || this.permissions.manageResetPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get canManageDeviceApprovals() {
|
||||||
|
return (this.isAdmin || this.permissions.manageResetPassword) && this.useSso;
|
||||||
|
}
|
||||||
|
|
||||||
get isExemptFromPolicies() {
|
get isExemptFromPolicies() {
|
||||||
return this.canManagePolicies;
|
return this.canManagePolicies;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue