1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-07 02:52:50 -05:00

Fix conflicting group permissions (#1473)

* Return collection with highest permission levels

* Revert "Return collection with highest permission levels"

This reverts commit 06e0f3b73e.

* Combine duplicate collectionDetails

* Update EF to combine duplicate CollectionDetails

* Delete unneeded using statements
This commit is contained in:
Thomas Rittson
2021-08-02 11:49:27 +10:00
committed by GitHub
parent 28df4fddb7
commit 8d2b36d187
7 changed files with 161 additions and 17 deletions

View File

@ -4,12 +4,24 @@
AS
BEGIN
SET NOCOUNT ON
SELECT TOP 1
*
SELECT
Id,
OrganizationId,
[Name],
CreationDate,
RevisionDate,
ExternalId,
MIN([ReadOnly]) AS [ReadOnly],
MIN([HidePasswords]) AS [HidePasswords]
FROM
[dbo].[UserCollectionDetails](@UserId)
WHERE
[Id] = @Id
ORDER BY
[ReadOnly] ASC
END
GROUP BY
Id,
OrganizationId,
[Name],
CreationDate,
RevisionDate,
ExternalId
END

View File

@ -5,7 +5,21 @@ BEGIN
SET NOCOUNT ON
SELECT
*
Id,
OrganizationId,
[Name],
CreationDate,
RevisionDate,
ExternalId,
MIN([ReadOnly]) AS [ReadOnly],
MIN([HidePasswords]) AS [HidePasswords]
FROM
[dbo].[UserCollectionDetails](@UserId)
END
GROUP BY
Id,
OrganizationId,
[Name],
CreationDate,
RevisionDate,
ExternalId
END