mirror of
https://github.com/bitwarden/server
synced 2026-01-07 11:03:37 +00:00
set cipher id to limit collection scope
This commit is contained in:
@@ -63,6 +63,7 @@ namespace Bit.Core.Services
|
||||
throw new BadRequestException("You do not have permissions to edit this.");
|
||||
}
|
||||
|
||||
cipher.UserId = savingUserId;
|
||||
if(cipher.Id == default(Guid))
|
||||
{
|
||||
if(cipher.OrganizationId.HasValue && collectionIds != null)
|
||||
|
||||
@@ -16,7 +16,7 @@ BEGIN
|
||||
UPDATE
|
||||
[dbo].[Cipher]
|
||||
SET
|
||||
[UserId] = @UserId,
|
||||
[UserId] = CASE WHEN @OrganizationId IS NULL THEN @UserId ELSE NULL END,
|
||||
[OrganizationId] = @OrganizationId,
|
||||
[Type] = @Type,
|
||||
[Data] = @Data,
|
||||
|
||||
Reference in New Issue
Block a user