1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 19:53:59 +00:00

chore: refactor canManageDeviceApprovals for clarity, refs PM-22390

This commit is contained in:
Vincent Salucci
2025-06-05 16:12:00 -05:00
parent bd9df15e73
commit db8b953fc5

View File

@@ -307,10 +307,15 @@ export class Organization {
* the latter has been added as a prerequisite.
*/
get canManageDeviceApprovals() {
return (
(this.isAdmin || (this.permissions.manageResetPassword && this.permissions.manageUsers)) &&
this.useSso
);
if (!this.useSso) {
return false;
}
if (this.isAdmin) {
return true;
}
return this.permissions.manageResetPassword && this.permissions.manageUsers;
}
get isExemptFromPolicies() {