mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
update sprocs for denorm. userid on foldercipher
This commit is contained in:
parent
943ef81c06
commit
f9ef519ec0
@ -35,7 +35,7 @@ BEGIN
|
|||||||
|
|
||||||
IF @FolderId IS NOT NULL
|
IF @FolderId IS NOT NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id
|
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId
|
||||||
END
|
END
|
||||||
|
|
||||||
IF @Favorite = 1
|
IF @Favorite = 1
|
||||||
|
@ -26,7 +26,7 @@ BEGIN
|
|||||||
|
|
||||||
IF @FolderId IS NOT NULL AND (@ExistingFolderId IS NULL OR @FolderId != @ExistingFolderId)
|
IF @FolderId IS NOT NULL AND (@ExistingFolderId IS NULL OR @FolderId != @ExistingFolderId)
|
||||||
BEGIN
|
BEGIN
|
||||||
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id
|
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId
|
||||||
END
|
END
|
||||||
|
|
||||||
IF @Favorite = 0
|
IF @Favorite = 0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
CREATE PROCEDURE [dbo].[FolderCipher_Create]
|
CREATE PROCEDURE [dbo].[FolderCipher_Create]
|
||||||
@FolderId UNIQUEIDENTIFIER,
|
@FolderId UNIQUEIDENTIFIER,
|
||||||
@CipherId UNIQUEIDENTIFIER
|
@CipherId UNIQUEIDENTIFIER,
|
||||||
|
@UserId UNIQUEIDENTIFIER
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
@ -8,11 +9,13 @@ BEGIN
|
|||||||
INSERT INTO [dbo].[FolderCipher]
|
INSERT INTO [dbo].[FolderCipher]
|
||||||
(
|
(
|
||||||
[FolderId],
|
[FolderId],
|
||||||
[CipherId]
|
[CipherId],
|
||||||
|
[UserId]
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
@FolderId,
|
@FolderId,
|
||||||
@CipherId
|
@CipherId,
|
||||||
|
@UserId
|
||||||
)
|
)
|
||||||
END
|
END
|
@ -1,6 +1,7 @@
|
|||||||
CREATE PROCEDURE [dbo].[FolderCipher_Delete]
|
CREATE PROCEDURE [dbo].[FolderCipher_Delete]
|
||||||
@FolderId UNIQUEIDENTIFIER,
|
@FolderId UNIQUEIDENTIFIER,
|
||||||
@CipherId UNIQUEIDENTIFIER
|
@CipherId UNIQUEIDENTIFIER,
|
||||||
|
@UserId UNIQUEIDENTIFIER
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
@ -11,4 +12,5 @@ BEGIN
|
|||||||
WHERE
|
WHERE
|
||||||
[FolderId] = @FolderId
|
[FolderId] = @FolderId
|
||||||
AND [CipherId] = @CipherId
|
AND [CipherId] = @CipherId
|
||||||
|
AND [UserId] = @UserId
|
||||||
END
|
END
|
Loading…
Reference in New Issue
Block a user