1
0
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:
Rui Tomé
2025-09-05 11:22:55 +01:00
committed by GitHub
parent 9a40a8d7ec
commit 8c598b8783
6 changed files with 231 additions and 3 deletions

View File

@@ -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;