1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Merge branch 'ac/ac-1682/data-migrations-for-deprecated-permissions' of https://github.com/bitwarden/server into ac/ac-1682/data-migrations-for-deprecated-permissions

This commit is contained in:
Rui Tome
2024-01-22 14:52:06 +00:00

View File

@ -126,6 +126,8 @@ BEGIN
INNER JOIN #TempUserManagers TUM ON CU.[OrganizationUserId] = TUM.[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], TUM.[OrganizationUserId], 0, 0, 1
FROM [dbo].[CollectionGroup] CG