mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
fixed #1997
This commit is contained in:
parent
c47cc7f8f2
commit
753e22f87f
1 changed files with 2 additions and 0 deletions
|
@ -480,6 +480,8 @@ namespace Ombi.Controllers
|
|||
if (modifyingSelf && role.Equals(OmbiRoles.Admin))
|
||||
{
|
||||
// We do not want to remove the admin role from yourself, this must be an accident
|
||||
var claim = ui.Claims.FirstOrDefault(x => x.Value == OmbiRoles.Admin && x.Enabled);
|
||||
ui.Claims.Remove(claim);
|
||||
continue;
|
||||
}
|
||||
await UserManager.RemoveFromRoleAsync(user, role);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue