aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-05-23 16:07:42 -0400
committerPatrick Barron <barronpm@gmail.com>2020-05-23 16:07:42 -0400
commite052128c527672ed586a78257da1d2b07319e598 (patch)
treefca76638b688bd2d2e6422f35c0fe00bc8aeb40c /Jellyfin.Server.Implementations
parente8173df9dc67470748c3293745fe3948363373b4 (diff)
Cleanup and fix more bugs
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 7c27a3c41e..41116c2512 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -556,6 +556,11 @@ namespace Jellyfin.Server.Implementations.Users
_invalidAuthProvider = _authenticationProviders.OfType<InvalidAuthProvider>().First();
_defaultAuthenticationProvider = _authenticationProviders.OfType<DefaultAuthenticationProvider>().First();
_defaultPasswordResetProvider = _passwordResetProviders.OfType<DefaultPasswordResetProvider>().First();
+
+ if (_authenticationProviders.Length > 2)
+ {
+ _logger.LogCritical("INVALID NUMBER OF LOGGERS: {0}", _authenticationProviders.Length);
+ }
}
/// <inheritdoc/>
@@ -616,7 +621,7 @@ namespace Jellyfin.Server.Implementations.Users
public void UpdatePolicy(Guid userId, UserPolicy policy)
{
var user = GetUserById(userId);
- int? loginAttempts = policy.LoginAttemptsBeforeLockout switch
+ int? maxLoginAttempts = policy.LoginAttemptsBeforeLockout switch
{
-1 => null,
0 => 3,
@@ -629,7 +634,7 @@ namespace Jellyfin.Server.Implementations.Users
user.AuthenticationProviderId = policy.AuthenticationProviderId;
user.PasswordResetProviderId = policy.PasswordResetProviderId;
user.InvalidLoginAttemptCount = policy.InvalidLoginAttemptCount;
- user.LoginAttemptsBeforeLockout = loginAttempts;
+ user.LoginAttemptsBeforeLockout = maxLoginAttempts;
user.SetPermission(PermissionKind.IsAdministrator, policy.IsAdministrator);
user.SetPermission(PermissionKind.IsHidden, policy.IsHidden);
user.SetPermission(PermissionKind.IsDisabled, policy.IsDisabled);