Merge pull request #3872 from crobibero/user-policy

Fix setting user policy
This commit is contained in:
Bond-009 2020-08-11 10:12:07 +02:00 committed by GitHub
commit b307e0fe09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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