Fix setting user policy
This commit is contained in:
parent
e9c9fc4369
commit
314728195c
|
@ -386,7 +386,7 @@ namespace Jellyfin.Api.Controllers
|
|||
var user = _userManager.GetUserById(userId);
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user