From cdb59f0939c1c863fa373a8774f19b9d8cde3f49 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Mon, 18 Dec 2023 17:32:53 -0800 Subject: [PATCH] [AC-1982] Add AllowAdminAccessToAllCollectionItems setting to the organization (#7268) --- .../src/admin-console/models/data/organization.data.ts | 2 ++ libs/common/src/admin-console/models/domain/organization.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/libs/common/src/admin-console/models/data/organization.data.ts b/libs/common/src/admin-console/models/data/organization.data.ts index 9fb9586c0a..50b94e2acc 100644 --- a/libs/common/src/admin-console/models/data/organization.data.ts +++ b/libs/common/src/admin-console/models/data/organization.data.ts @@ -50,6 +50,7 @@ export class OrganizationData { familySponsorshipToDelete?: boolean; accessSecretsManager: boolean; limitCollectionCreationDeletion: boolean; + allowAdminAccessToAllCollectionItems: boolean; constructor( response: ProfileOrganizationResponse, @@ -102,6 +103,7 @@ export class OrganizationData { this.familySponsorshipToDelete = response.familySponsorshipToDelete; this.accessSecretsManager = response.accessSecretsManager; this.limitCollectionCreationDeletion = response.limitCollectionCreationDeletion; + this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems; this.isMember = options.isMember; this.isProviderUser = options.isProviderUser; diff --git a/libs/common/src/admin-console/models/domain/organization.ts b/libs/common/src/admin-console/models/domain/organization.ts index 998bd93455..056c9141a2 100644 --- a/libs/common/src/admin-console/models/domain/organization.ts +++ b/libs/common/src/admin-console/models/domain/organization.ts @@ -68,6 +68,10 @@ export class Organization { * Refers to the ability for an organization to limit collection creation and deletion to owners and admins only */ limitCollectionCreationDeletion: boolean; + /** + * Refers to the ability for an owner/admin to access all collection items, regardless of assigned collections + */ + allowAdminAccessToAllCollectionItems: boolean; constructor(obj?: OrganizationData) { if (obj == null) { @@ -120,6 +124,7 @@ export class Organization { this.familySponsorshipToDelete = obj.familySponsorshipToDelete; this.accessSecretsManager = obj.accessSecretsManager; this.limitCollectionCreationDeletion = obj.limitCollectionCreationDeletion; + this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems; } get canAccess() {