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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user