mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Add IsAdminUser method to UserService
This commit is contained in:
@@ -198,7 +198,7 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
}
|
||||
|
||||
// We can safely delete the user if it's not an admin user
|
||||
if (!_userService.IsRoleAdmin(await _userManager.GetRolesAsync(user)))
|
||||
if (!(await _userService.IsAdminUser(user)))
|
||||
{
|
||||
await _userService.DeleteUserAndAssociatedData(user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user