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

reimport db after subvault => collection rename

This commit is contained in:
Kyle Spearrin
2017-04-27 09:24:46 -04:00
parent c6ac82dadd
commit b2bebda9ed
45 changed files with 123 additions and 123 deletions

View File

@ -0,0 +1,20 @@
CREATE PROCEDURE [dbo].[CollectionCipher_ReadByUserId]
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
SC.*
FROM
[dbo].[CollectionCipher] SC
INNER JOIN
[dbo].[Collection] S ON S.[Id] = SC.[CollectionId]
INNER JOIN
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] AND OU.[UserId] = @UserId
LEFT JOIN
[dbo].[CollectionUser] SU ON OU.[AccessAllCollections] = 0 AND SU.[CollectionId] = S.[Id] AND SU.[OrganizationUserId] = OU.[Id]
WHERE
OU.[Status] = 2 -- Confirmed
AND (OU.[AccessAllCollections] = 1 OR SU.[CollectionId] IS NOT NULL)
END