From 8c75326439da7126b80b3d0846423f1c00f27b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Tom=C3=A9?= <108268980+r-tome@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:42:04 +0100 Subject: [PATCH] [AC-1612] Updated CurrentContext.ViewAssignedCollections to check if the user has CreateNewCollections permission (#3233) * [AC-1612] Updated CurrentContext.ViewAssignedCollections to check if the user has CreateNewCollections permission * [AC-1612] Added comment to clarify the requirement of the added check in ViewAssignedCollections --- src/Core/Context/CurrentContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Core/Context/CurrentContext.cs b/src/Core/Context/CurrentContext.cs index 4877a9a8f2..4751beb797 100644 --- a/src/Core/Context/CurrentContext.cs +++ b/src/Core/Context/CurrentContext.cs @@ -358,7 +358,9 @@ public class CurrentContext : ICurrentContext public async Task ViewAssignedCollections(Guid orgId) { - return await EditAssignedCollections(orgId) || await DeleteAssignedCollections(orgId); + return await CreateNewCollections(orgId) // Required to display the existing collections under which the new collection can be nested + || await EditAssignedCollections(orgId) + || await DeleteAssignedCollections(orgId); } public async Task ManageGroups(Guid orgId)