mirror of
https://github.com/bitwarden/server
synced 2026-01-04 17:43:53 +00:00
cleanup sql aliases from collection rename
This commit is contained in:
@@ -25,12 +25,12 @@ BEGIN
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = O.[Id] AND OU.[UserId] = @UserId
|
||||
LEFT JOIN
|
||||
[dbo].[CollectionUser] SU ON OU.[AccessAllCollections] = 0 AND SU.[CollectionId] = S.[Id] AND SU.[OrganizationUserId] = OU.[Id]
|
||||
[dbo].[CollectionUser] CU ON OU.[AccessAllCollections] = 0 AND CU.[CollectionId] = S.[Id] AND CU.[OrganizationUserId] = OU.[Id]
|
||||
WHERE
|
||||
O.[Id] = @OrgId
|
||||
AND O.[Enabled] = 1
|
||||
AND OU.[Status] = 2 -- Confirmed
|
||||
AND (OU.[AccessAllCollections] = 1 OR SU.[ReadOnly] = 0)
|
||||
AND (OU.[AccessAllCollections] = 1 OR CU.[ReadOnly] = 0)
|
||||
)
|
||||
MERGE
|
||||
[dbo].[CollectionCipher] AS [Target]
|
||||
|
||||
Reference in New Issue
Block a user