1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-28 14:54:50 -05:00

proper parens for folder delete

This commit is contained in:
Kyle Spearrin 2017-05-03 14:55:31 -04:00
parent 92fb369eb9
commit 1a4c8b2db7

View File

@ -22,10 +22,12 @@ BEGIN
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id]
WHERE
C.[UserId] = @UserId
OR (
C.[UserId] IS NULL
AND (OU.[AccessAll] = 1 OR CU.[CollectionId] IS NOT NULL)
(
C.[UserId] = @UserId
OR (
C.[UserId] IS NULL
AND (OU.[AccessAll] = 1 OR CU.[CollectionId] IS NOT NULL)
)
)
AND C.[Folders] IS NOT NULL
AND JSON_VALUE(C.[Folders], @UserIdPath) = @Id