Implement more review suggestions

This commit is contained in:
Patrick Barron 2020-06-07 19:37:47 -04:00
parent 98142613e8
commit 75af0a4e57
2 changed files with 2 additions and 3 deletions

View File

@ -276,7 +276,7 @@ namespace Jellyfin.Server.Implementations.Users
Name = user.Username, Name = user.Username,
Id = user.Id, Id = user.Id,
ServerId = _appHost.SystemId, ServerId = _appHost.SystemId,
HasPassword = user.Password != null, HasPassword = GetAuthenticationProvider(user).HasPassword(user),
EnableAutoLogin = user.EnableAutoLogin, EnableAutoLogin = user.EnableAutoLogin,
LastLoginDate = user.LastLoginDate, LastLoginDate = user.LastLoginDate,
LastActivityDate = user.LastActivityDate, LastActivityDate = user.LastActivityDate,
@ -303,7 +303,7 @@ namespace Jellyfin.Server.Implementations.Users
{ {
MaxParentalRating = user.MaxParentalAgeRating, MaxParentalRating = user.MaxParentalAgeRating,
EnableUserPreferenceAccess = user.EnableUserPreferenceAccess, EnableUserPreferenceAccess = user.EnableUserPreferenceAccess,
RemoteClientBitrateLimit = user.RemoteClientBitrateLimit ?? -1, RemoteClientBitrateLimit = user.RemoteClientBitrateLimit ?? 0,
AuthenticationProviderId = user.AuthenticationProviderId, AuthenticationProviderId = user.AuthenticationProviderId,
PasswordResetProviderId = user.PasswordResetProviderId, PasswordResetProviderId = user.PasswordResetProviderId,
InvalidLoginAttemptCount = user.InvalidLoginAttemptCount, InvalidLoginAttemptCount = user.InvalidLoginAttemptCount,

View File

@ -566,7 +566,6 @@ namespace MediaBrowser.Api
AssertCanUpdateUser(_authContext, _userManager, request.Id, false); AssertCanUpdateUser(_authContext, _userManager, request.Id, false);
_userManager.UpdateConfiguration(request.Id, request); _userManager.UpdateConfiguration(request.Id, request);
} }
public void Post(UpdateUserPolicy request) public void Post(UpdateUserPolicy request)