mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
cleanup sql aliases from collection rename
This commit is contained in:
@ -13,8 +13,8 @@ BEGIN
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] 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
|
||||
OU.[Status] = 2 -- Confirmed
|
||||
AND (OU.[AccessAllCollections] = 1 OR SU.[CollectionId] IS NOT NULL)
|
||||
AND (OU.[AccessAllCollections] = 1 OR CU.[CollectionId] IS NOT NULL)
|
||||
END
|
Reference in New Issue
Block a user