mirror of
https://github.com/bitwarden/server.git
synced 2025-06-17 09:33:51 -05:00
31 lines
655 B
Transact-SQL
31 lines
655 B
Transact-SQL
CREATE PROCEDURE [dbo].[Collection_ReadByUserId]
|
|
@UserId UNIQUEIDENTIFIER
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
|
|
SELECT
|
|
Id,
|
|
OrganizationId,
|
|
[Name],
|
|
CreationDate,
|
|
RevisionDate,
|
|
ExternalId,
|
|
MIN([ReadOnly]) AS [ReadOnly],
|
|
MIN([HidePasswords]) AS [HidePasswords],
|
|
MAX([Manage]) AS [Manage],
|
|
[DefaultUserCollectionEmail],
|
|
[Type]
|
|
FROM
|
|
[dbo].[UserCollectionDetails](@UserId)
|
|
GROUP BY
|
|
Id,
|
|
OrganizationId,
|
|
[Name],
|
|
CreationDate,
|
|
RevisionDate,
|
|
ExternalId,
|
|
[DefaultUserCollectionEmail],
|
|
[Type]
|
|
END
|