From 6579ede14279d7b91f6e9c16ae802a934a7ec6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Tom=C3=A9?= <108268980+r-tome@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:05:00 +0000 Subject: [PATCH] Update src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --- .../Organization_EnableCollectionEnhancements.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql b/src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql index 55ab9891b3..16a0376532 100644 --- a/src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql +++ b/src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql @@ -126,6 +126,8 @@ BEGIN INNER JOIN #TempStep3 temp ON cu.[OrganizationUserId] = temp.[OrganizationUserId]; -- Insert rows to [dbo].[CollectionUser] with [Manage] = 1 using the temporary table + -- This is for orgUsers who are Managers / EditAssignedCollections but have access via a group + -- We cannot give the whole group Manage permissions so we have to give them a direct assignment INSERT INTO [dbo].[CollectionUser] ([CollectionId], [OrganizationUserId], [ReadOnly], [HidePasswords], [Manage]) SELECT cg.[CollectionId], ou.[OrganizationUserId], 0, 0, 1 FROM [dbo].[CollectionGroup] cg