mirror of
https://github.com/bitwarden/server
synced 2026-01-02 00:23:40 +00:00
Be explicit with AccessAll and fix bug in create/update cipher
This commit is contained in:
@@ -3,7 +3,14 @@ RETURNS TABLE
|
||||
AS RETURN
|
||||
SELECT
|
||||
C.*,
|
||||
COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) AS [ReadOnly],
|
||||
CASE
|
||||
WHEN
|
||||
OU.[AccessAll] = 1
|
||||
OR G.[AccessAll] = 1
|
||||
OR COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) = 0
|
||||
THEN 0
|
||||
ELSE 1
|
||||
END [ReadOnly],
|
||||
COALESCE(CU.[HidePasswords], CG.[HidePasswords], 0) AS [HidePasswords]
|
||||
FROM
|
||||
[dbo].[CollectionView] C
|
||||
|
||||
Reference in New Issue
Block a user