mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
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…
x
Reference in New Issue
Block a user