1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-26 09:33:22 +00:00

[PM-32131] Add UseMyItems organization ability (#19018)

Not used in the front-end yet, but adding it here
for consistency
This commit is contained in:
Thomas Rittson
2026-02-25 12:54:23 +10:00
committed by GitHub
parent f2837e9099
commit da0005b01b
5 changed files with 9 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ describe("ORGANIZATIONS state", () => {
ssoMemberDecryptionType: undefined,
useDisableSMAdsForUsers: false,
usePhishingBlocker: false,
useMyItems: false,
},
};
const result = sut.deserializer(JSON.parse(JSON.stringify(expectedResult)));

View File

@@ -69,6 +69,7 @@ export class OrganizationData {
ssoEnabled: boolean;
ssoMemberDecryptionType?: MemberDecryptionType;
usePhishingBlocker: boolean;
useMyItems: boolean;
constructor(
response?: ProfileOrganizationResponse,
@@ -139,6 +140,7 @@ export class OrganizationData {
this.ssoEnabled = response.ssoEnabled;
this.ssoMemberDecryptionType = response.ssoMemberDecryptionType;
this.usePhishingBlocker = response.usePhishingBlocker;
this.useMyItems = response.useMyItems;
this.isMember = options.isMember;
this.isProviderUser = options.isProviderUser;

View File

@@ -100,6 +100,7 @@ export class Organization {
ssoEnabled: boolean;
ssoMemberDecryptionType?: MemberDecryptionType;
usePhishingBlocker: boolean;
useMyItems: boolean;
constructor(obj?: OrganizationData) {
if (obj == null) {
@@ -166,6 +167,7 @@ export class Organization {
this.ssoEnabled = obj.ssoEnabled;
this.ssoMemberDecryptionType = obj.ssoMemberDecryptionType;
this.usePhishingBlocker = obj.usePhishingBlocker;
this.useMyItems = obj.useMyItems;
}
get canAccess() {

View File

@@ -41,6 +41,7 @@ export class OrganizationResponse extends BaseResponse {
useDisableSMAdsForUsers: boolean;
useAccessIntelligence: boolean;
usePhishingBlocker: boolean;
useMyItems: boolean;
constructor(response: any) {
super(response);
@@ -86,5 +87,6 @@ export class OrganizationResponse extends BaseResponse {
// Map from backend API property (UseRiskInsights) to domain model property (useAccessIntelligence)
this.useAccessIntelligence = this.getResponseProperty("UseRiskInsights");
this.usePhishingBlocker = this.getResponseProperty("UsePhishingBlocker") ?? false;
this.useMyItems = this.getResponseProperty("UseMyItems") ?? false;
}
}

View File

@@ -64,6 +64,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
ssoEnabled: boolean;
ssoMemberDecryptionType?: MemberDecryptionType;
usePhishingBlocker: boolean;
useMyItems: boolean;
constructor(response: any) {
super(response);
@@ -139,5 +140,6 @@ export class ProfileOrganizationResponse extends BaseResponse {
this.ssoEnabled = this.getResponseProperty("SsoEnabled") ?? false;
this.ssoMemberDecryptionType = this.getResponseProperty("SsoMemberDecryptionType");
this.usePhishingBlocker = this.getResponseProperty("UsePhishingBlocker") ?? false;
this.useMyItems = this.getResponseProperty("UseMyItems") ?? false;
}
}