1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-29 23:34:53 -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 LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id] [dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id]
WHERE WHERE
C.[UserId] = @UserId (
OR ( C.[UserId] = @UserId
C.[UserId] IS NULL OR (
AND (OU.[AccessAll] = 1 OR CU.[CollectionId] IS NOT NULL) C.[UserId] IS NULL
AND (OU.[AccessAll] = 1 OR CU.[CollectionId] IS NOT NULL)
)
) )
AND C.[Folders] IS NOT NULL AND C.[Folders] IS NOT NULL
AND JSON_VALUE(C.[Folders], @UserIdPath) = @Id AND JSON_VALUE(C.[Folders], @UserIdPath) = @Id