1
0
mirror of https://github.com/bitwarden/server synced 2026-01-17 07:53:36 +00:00

fix bugs around collection association

This commit is contained in:
Kyle Spearrin
2017-08-30 18:18:39 -04:00
parent 5021b71463
commit 770fa10f3e
6 changed files with 230 additions and 36 deletions

View File

@@ -31,16 +31,16 @@ BEGIN
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON G.[AccessAll] = 0 AND CG.[CollectionId] = C.[Id] AND CG.[GroupId] = GU.[GroupId]
[dbo].[CollectionGroup] CG ON G.[AccessAll] = 0 AND CG.[GroupId] = GU.[GroupId]
WHERE
O.[Id] = @OrgId
AND O.[Enabled] = 1
AND OU.[Status] = 2 -- Confirmed
AND (
OU.[AccessAll] = 1
OR CU.[CollectionId] IS NOT NULL
OR CU.[ReadOnly] = 0
OR G.[AccessAll] = 1
OR CG.[CollectionId] IS NOT NULL
OR CG.[ReadOnly] = 0
)
)
MERGE