Add IsAdminUser method to UserService

This commit is contained in:
Umar Bolatov
2021-04-06 18:19:31 -07:00
parent 53c81918a5
commit b4076b53e8
2 changed files with 6 additions and 1 deletions

View File

@@ -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);