mirror of
https://github.com/bitwarden/server.git
synced 2025-02-17 02:01:53 +01:00
userid set only when creating with collection ids
This commit is contained in:
parent
c710226223
commit
3f319aee64
@ -63,11 +63,12 @@ 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)
|
||||
{
|
||||
// Set user ID to limit scope of collection ids in the create sproc
|
||||
cipher.UserId = savingUserId;
|
||||
await _cipherRepository.CreateAsync(cipher, collectionIds);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user