This commit is contained in:
tidusjar 2018-02-28 12:43:02 +00:00
commit 753e22f87f

View file

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