mirror of
https://github.com/bitwarden/browser
synced 2026-02-19 02:44:01 +00:00
[PM-22839] Update Device Approvals visibility based on SSO configuration (#16144)
* Add ssoEnabled and ssoMemberDecryptionType properties to ProfileOrganizationResponse * Add SSO support to Organization model with ssoEnabled and ssoMemberDecryptionType properties, and implement related tests * Upsert organization SSO settings in memory after save Updates organization data in memory with new SSO configuration values to ensure immediate UI updates for Device Approvals page visibility. * Refactor SSO component to simplify upsertOrganizationWithSsoChanges method - Updated the method signature to accept a single OrganizationSsoRequest object instead of separate parameters. - Adjusted the internal logic to directly use properties from the OrganizationSsoRequest for updating the organization state. * Specify OrganizationData type for updatedOrganization in SSO component
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// @ts-strict-ignore
|
||||
import { Jsonify } from "type-fest";
|
||||
|
||||
import { MemberDecryptionType } from "../../../auth/enums/sso";
|
||||
import { ProductTierType } from "../../../billing/enums";
|
||||
import { OrganizationUserStatusType, OrganizationUserType, ProviderType } from "../../enums";
|
||||
import { PermissionsApi } from "../api/permissions.api";
|
||||
@@ -63,6 +64,8 @@ export class OrganizationData {
|
||||
useRiskInsights: boolean;
|
||||
useAdminSponsoredFamilies: boolean;
|
||||
isAdminInitiated: boolean;
|
||||
ssoEnabled: boolean;
|
||||
ssoMemberDecryptionType?: MemberDecryptionType;
|
||||
|
||||
constructor(
|
||||
response?: ProfileOrganizationResponse,
|
||||
@@ -128,6 +131,8 @@ export class OrganizationData {
|
||||
this.useRiskInsights = response.useRiskInsights;
|
||||
this.useAdminSponsoredFamilies = response.useAdminSponsoredFamilies;
|
||||
this.isAdminInitiated = response.isAdminInitiated;
|
||||
this.ssoEnabled = response.ssoEnabled;
|
||||
this.ssoMemberDecryptionType = response.ssoMemberDecryptionType;
|
||||
|
||||
this.isMember = options.isMember;
|
||||
this.isProviderUser = options.isProviderUser;
|
||||
|
||||
Reference in New Issue
Block a user