Fix setting user policy

This commit is contained in:
crobibero 2020-08-10 09:31:01 -06:00
parent e9c9fc4369
commit 314728195c

View File

@ -386,7 +386,7 @@ namespace Jellyfin.Api.Controllers
var user = _userManager.GetUserById(userId); var user = _userManager.GetUserById(userId);
// If removing admin access // If removing admin access
if (!(newPolicy.IsAdministrator && user.HasPermission(PermissionKind.IsAdministrator))) if (!newPolicy.IsAdministrator && user.HasPermission(PermissionKind.IsAdministrator))
{ {
if (_userManager.Users.Count(i => i.HasPermission(PermissionKind.IsAdministrator)) == 1) if (_userManager.Users.Count(i => i.HasPermission(PermissionKind.IsAdministrator)) == 1)
{ {