From 2f6e4630127aafce1ba43437be2d9810d21e8819 Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Mon, 13 Mar 2023 11:09:44 -0400 Subject: [PATCH] [AC-1105] allow users with manage groups permission to access collections (#2780) --- src/Api/Controllers/CollectionsController.cs | 2 +- src/Core/Services/Implementations/CollectionService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Controllers/CollectionsController.cs b/src/Api/Controllers/CollectionsController.cs index 4954cf1f2..6f06c643a 100644 --- a/src/Api/Controllers/CollectionsController.cs +++ b/src/Api/Controllers/CollectionsController.cs @@ -79,7 +79,7 @@ public class CollectionsController : Controller [HttpGet("details")] public async Task> GetManyWithDetails(Guid orgId) { - if (!await ViewAtLeastOneCollectionAsync(orgId) && !await _currentContext.ManageUsers(orgId)) + if (!await ViewAtLeastOneCollectionAsync(orgId) && !await _currentContext.ManageUsers(orgId) && !await _currentContext.ManageGroups(orgId)) { throw new NotFoundException(); } diff --git a/src/Core/Services/Implementations/CollectionService.cs b/src/Core/Services/Implementations/CollectionService.cs index 607cb9eb3..c14020e2d 100644 --- a/src/Core/Services/Implementations/CollectionService.cs +++ b/src/Core/Services/Implementations/CollectionService.cs @@ -97,7 +97,7 @@ public class CollectionService : ICollectionService public async Task> GetOrganizationCollections(Guid organizationId) { - if (!await _currentContext.ViewAllCollections(organizationId) && !await _currentContext.ManageUsers(organizationId)) + if (!await _currentContext.ViewAllCollections(organizationId) && !await _currentContext.ManageUsers(organizationId) && !await _currentContext.ManageGroups(organizationId)) { throw new NotFoundException(); }