mirror of
https://github.com/bitwarden/server
synced 2025-12-12 06:13:43 +00:00
check user access permissions on collections edit
This commit is contained in:
@@ -478,6 +478,10 @@ namespace Bit.Core.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(await UserCanEditAsync(cipher, savingUserId)))
|
||||
{
|
||||
throw new BadRequestException("You do not have permissions to edit this.");
|
||||
}
|
||||
await _collectionCipherRepository.UpdateCollectionsAsync(cipher.Id, savingUserId, collectionIds);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user