diff --git a/src/Sql/dbo/Stored Procedures/CipherDetails_Create.sql b/src/Sql/dbo/Stored Procedures/CipherDetails_Create.sql index d3be629e6..3d6bd8462 100644 --- a/src/Sql/dbo/Stored Procedures/CipherDetails_Create.sql +++ b/src/Sql/dbo/Stored Procedures/CipherDetails_Create.sql @@ -35,7 +35,7 @@ BEGIN IF @FolderId IS NOT NULL BEGIN - EXEC [dbo].[FolderCipher_Create] @FolderId, @Id + EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId END IF @Favorite = 1 diff --git a/src/Sql/dbo/Stored Procedures/Cipher_UpdatePartial.sql b/src/Sql/dbo/Stored Procedures/Cipher_UpdatePartial.sql index e1a01dd01..04cbdd16b 100644 --- a/src/Sql/dbo/Stored Procedures/Cipher_UpdatePartial.sql +++ b/src/Sql/dbo/Stored Procedures/Cipher_UpdatePartial.sql @@ -26,7 +26,7 @@ BEGIN IF @FolderId IS NOT NULL AND (@ExistingFolderId IS NULL OR @FolderId != @ExistingFolderId) BEGIN - EXEC [dbo].[FolderCipher_Create] @FolderId, @Id + EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId END IF @Favorite = 0 diff --git a/src/Sql/dbo/Stored Procedures/FolderCipher_Create.sql b/src/Sql/dbo/Stored Procedures/FolderCipher_Create.sql index 161a8886e..94035d4c0 100644 --- a/src/Sql/dbo/Stored Procedures/FolderCipher_Create.sql +++ b/src/Sql/dbo/Stored Procedures/FolderCipher_Create.sql @@ -1,6 +1,7 @@ CREATE PROCEDURE [dbo].[FolderCipher_Create] @FolderId UNIQUEIDENTIFIER, - @CipherId UNIQUEIDENTIFIER + @CipherId UNIQUEIDENTIFIER, + @UserId UNIQUEIDENTIFIER AS BEGIN SET NOCOUNT ON @@ -8,11 +9,13 @@ BEGIN INSERT INTO [dbo].[FolderCipher] ( [FolderId], - [CipherId] + [CipherId], + [UserId] ) VALUES ( @FolderId, - @CipherId + @CipherId, + @UserId ) END \ No newline at end of file diff --git a/src/Sql/dbo/Stored Procedures/FolderCipher_Delete.sql b/src/Sql/dbo/Stored Procedures/FolderCipher_Delete.sql index dd702226f..5bf233420 100644 --- a/src/Sql/dbo/Stored Procedures/FolderCipher_Delete.sql +++ b/src/Sql/dbo/Stored Procedures/FolderCipher_Delete.sql @@ -1,6 +1,7 @@ CREATE PROCEDURE [dbo].[FolderCipher_Delete] @FolderId UNIQUEIDENTIFIER, - @CipherId UNIQUEIDENTIFIER + @CipherId UNIQUEIDENTIFIER, + @UserId UNIQUEIDENTIFIER AS BEGIN SET NOCOUNT ON @@ -11,4 +12,5 @@ BEGIN WHERE [FolderId] = @FolderId AND [CipherId] = @CipherId + AND [UserId] = @UserId END \ No newline at end of file