1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-02 13:23:29 +01:00

[AC-1474] update organization models to include SM beta flag

This commit is contained in:
William Martin 2023-06-30 10:27:22 -04:00
parent 93691e725f
commit 766c89d6e8
No known key found for this signature in database
GPG Key ID: A65ACD91BADF316B
4 changed files with 10 additions and 0 deletions

View File

@ -49,6 +49,7 @@ export class OrganizationData {
familySponsorshipValidUntil?: Date; familySponsorshipValidUntil?: Date;
familySponsorshipToDelete?: boolean; familySponsorshipToDelete?: boolean;
accessSecretsManager: boolean; accessSecretsManager: boolean;
secretsManagerBeta: boolean;
constructor( constructor(
response: ProfileOrganizationResponse, response: ProfileOrganizationResponse,
@ -100,6 +101,7 @@ export class OrganizationData {
this.familySponsorshipValidUntil = response.familySponsorshipValidUntil; this.familySponsorshipValidUntil = response.familySponsorshipValidUntil;
this.familySponsorshipToDelete = response.familySponsorshipToDelete; this.familySponsorshipToDelete = response.familySponsorshipToDelete;
this.accessSecretsManager = response.accessSecretsManager; this.accessSecretsManager = response.accessSecretsManager;
this.secretsManagerBeta = response.secretsManagerBeta;
this.isMember = options.isMember; this.isMember = options.isMember;
this.isProviderUser = options.isProviderUser; this.isProviderUser = options.isProviderUser;

View File

@ -64,6 +64,10 @@ export class Organization {
familySponsorshipValidUntil?: Date; familySponsorshipValidUntil?: Date;
familySponsorshipToDelete?: boolean; familySponsorshipToDelete?: boolean;
accessSecretsManager: boolean; accessSecretsManager: boolean;
/**
* Indicates the organization is participating in the Secrets Manager Beta
*/
secretsManagerBeta: boolean;
constructor(obj?: OrganizationData) { constructor(obj?: OrganizationData) {
if (obj == null) { if (obj == null) {

View File

@ -33,6 +33,7 @@ export class OrganizationResponse extends BaseResponse {
smServiceAccounts?: number; smServiceAccounts?: number;
maxAutoscaleSmSeats?: number; maxAutoscaleSmSeats?: number;
maxAutoscaleSmServiceAccounts?: number; maxAutoscaleSmServiceAccounts?: number;
secretsManagerBeta?: boolean;
constructor(response: any) { constructor(response: any) {
super(response); super(response);
@ -72,5 +73,6 @@ export class OrganizationResponse extends BaseResponse {
this.smServiceAccounts = this.getResponseProperty("SmServiceAccounts"); this.smServiceAccounts = this.getResponseProperty("SmServiceAccounts");
this.maxAutoscaleSmSeats = this.getResponseProperty("MaxAutoscaleSmSeats"); this.maxAutoscaleSmSeats = this.getResponseProperty("MaxAutoscaleSmSeats");
this.maxAutoscaleSmServiceAccounts = this.getResponseProperty("MaxAutoscaleSmServiceAccounts"); this.maxAutoscaleSmServiceAccounts = this.getResponseProperty("MaxAutoscaleSmServiceAccounts");
this.secretsManagerBeta = this.getResponseProperty("SecretsManagerBeta");
} }
} }

View File

@ -48,6 +48,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
familySponsorshipValidUntil?: Date; familySponsorshipValidUntil?: Date;
familySponsorshipToDelete?: boolean; familySponsorshipToDelete?: boolean;
accessSecretsManager: boolean; accessSecretsManager: boolean;
secretsManagerBeta: boolean;
constructor(response: any) { constructor(response: any) {
super(response); super(response);
@ -105,5 +106,6 @@ export class ProfileOrganizationResponse extends BaseResponse {
} }
this.familySponsorshipToDelete = this.getResponseProperty("FamilySponsorshipToDelete"); this.familySponsorshipToDelete = this.getResponseProperty("FamilySponsorshipToDelete");
this.accessSecretsManager = this.getResponseProperty("AccessSecretsManager"); this.accessSecretsManager = this.getResponseProperty("AccessSecretsManager");
this.secretsManagerBeta = this.getResponseProperty("SecretsManagerBeta") ?? false;
} }
} }