mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
[PM-25922] Hotfix: Revert canManageDeviceApprovals (#16478)
This commit is contained in:
@@ -111,28 +111,6 @@ describe("Organization", () => {
|
||||
expect(organization.canManageDeviceApprovals).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false when ssoEnabled is false", () => {
|
||||
data.type = OrganizationUserType.Admin;
|
||||
data.useSso = true;
|
||||
data.ssoEnabled = false;
|
||||
data.ssoMemberDecryptionType = MemberDecryptionType.TrustedDeviceEncryption;
|
||||
|
||||
const organization = new Organization(data);
|
||||
|
||||
expect(organization.canManageDeviceApprovals).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false when ssoMemberDecryptionType is not TrustedDeviceEncryption", () => {
|
||||
data.type = OrganizationUserType.Admin;
|
||||
data.useSso = true;
|
||||
data.ssoEnabled = true;
|
||||
data.ssoMemberDecryptionType = MemberDecryptionType.MasterPassword;
|
||||
|
||||
const organization = new Organization(data);
|
||||
|
||||
expect(organization.canManageDeviceApprovals).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true when admin has all required SSO settings enabled", () => {
|
||||
data.type = OrganizationUserType.Admin;
|
||||
data.useSso = true;
|
||||
|
||||
@@ -309,12 +309,7 @@ export class Organization {
|
||||
}
|
||||
|
||||
get canManageDeviceApprovals() {
|
||||
return (
|
||||
(this.isAdmin || this.permissions.manageResetPassword) &&
|
||||
this.useSso &&
|
||||
this.ssoEnabled &&
|
||||
this.ssoMemberDecryptionType === MemberDecryptionType.TrustedDeviceEncryption
|
||||
);
|
||||
return (this.isAdmin || this.permissions.manageResetPassword) && this.useSso;
|
||||
}
|
||||
|
||||
get isExemptFromPolicies() {
|
||||
|
||||
Reference in New Issue
Block a user