mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
11 lines
427 B
Plaintext
11 lines
427 B
Plaintext
-- Update "CollectionUser" with "Manage" = 1 for all users with Manager role or 'EditAssignedCollections' permission
|
|
UPDATE "CollectionUsers" cu
|
|
SET "ReadOnly" = false,
|
|
"HidePasswords" = false,
|
|
"Manage" = true
|
|
FROM "OrganizationUser" ou
|
|
WHERE cu."OrganizationUserId" = ou."Id"
|
|
AND (ou."Type" = 3 OR
|
|
(ou."Permissions" IS NOT NULL AND
|
|
(ou."Permissions"::text)::jsonb->>'editAssignedCollections' = 'true'));
|