mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
cipher delete for admin
This commit is contained in:
@ -65,9 +65,9 @@ namespace Bit.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(CipherDetails cipher, Guid deletingUserId)
|
||||
public async Task DeleteAsync(Cipher cipher, Guid deletingUserId, bool orgAdmin = false)
|
||||
{
|
||||
if(!(await UserCanEditAsync(cipher, deletingUserId)))
|
||||
if(!orgAdmin && !(await UserCanEditAsync(cipher, deletingUserId)))
|
||||
{
|
||||
throw new BadRequestException("Not an admin.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user