From 270132165928bb754ac10610ff0014d1ae6b471e Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 24 Oct 2023 11:30:08 -0700 Subject: [PATCH] [AC-1685] Add ViewAllCollections check to GetOrganizationCollectionsAsync method (#3323) --- src/Core/Services/Implementations/CollectionService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/CollectionService.cs b/src/Core/Services/Implementations/CollectionService.cs index 006c8c5cfc..b30645f4d1 100644 --- a/src/Core/Services/Implementations/CollectionService.cs +++ b/src/Core/Services/Implementations/CollectionService.cs @@ -98,7 +98,13 @@ public class CollectionService : ICollectionService public async Task> GetOrganizationCollectionsAsync(Guid organizationId) { - if (!await _currentContext.ViewAssignedCollections(organizationId) && !await _currentContext.ManageUsers(organizationId) && !await _currentContext.ManageGroups(organizationId) && !await _currentContext.AccessImportExport(organizationId)) + if ( + !await _currentContext.ViewAssignedCollections(organizationId) && + !await _currentContext.ViewAllCollections(organizationId) && + !await _currentContext.ManageUsers(organizationId) && + !await _currentContext.ManageGroups(organizationId) && + !await _currentContext.AccessImportExport(organizationId) + ) { throw new NotFoundException(); }