1
0
mirror of https://github.com/bitwarden/server synced 2026-01-20 09:23:28 +00:00

cleanup sql aliases from collection rename

This commit is contained in:
Kyle Spearrin
2017-04-27 09:46:03 -04:00
parent 77aec3977c
commit 44883091f6
15 changed files with 44 additions and 44 deletions

View File

@@ -14,9 +14,9 @@ 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
SC.[CipherId] = @CipherId
AND 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