mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00

* 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
28 lines
568 B
Transact-SQL
28 lines
568 B
Transact-SQL
CREATE PROCEDURE [dbo].[Collection_ReadByIdUserId]
|
|
@Id UNIQUEIDENTIFIER,
|
|
@UserId UNIQUEIDENTIFIER
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
SELECT
|
|
Id,
|
|
OrganizationId,
|
|
[Name],
|
|
CreationDate,
|
|
RevisionDate,
|
|
ExternalId,
|
|
MIN([ReadOnly]) AS [ReadOnly],
|
|
MIN([HidePasswords]) AS [HidePasswords]
|
|
FROM
|
|
[dbo].[UserCollectionDetails](@UserId)
|
|
WHERE
|
|
[Id] = @Id
|
|
GROUP BY
|
|
Id,
|
|
OrganizationId,
|
|
[Name],
|
|
CreationDate,
|
|
RevisionDate,
|
|
ExternalId
|
|
END
|