diff options
| author | T. Adams <t.adams88@gmail.com> | 2015-04-03 11:04:25 -0700 |
|---|---|---|
| committer | T. Adams <t.adams88@gmail.com> | 2015-04-03 11:04:25 -0700 |
| commit | abf12569ba2aa31ea3a00e4faf3adad2f740cbd9 (patch) | |
| tree | 47c57c6361825491d38e3def6b716926ddd9aa59 /MediaBrowser.Server.Implementations/Library/UserManager.cs | |
| parent | 46c92107490263f8e6abefbd2259780013fa195d (diff) | |
| parent | ef505c8e9e2b8f348aeaa89be6bc446014b72996 (diff) | |
Merging in latest dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/UserManager.cs | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index b101f6ae1..03471a8e9 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -166,11 +166,6 @@ namespace MediaBrowser.Server.Implementations.Library var users = Users.ToList(); - foreach (var user in users) - { - await DoPolicyMigration(user).ConfigureAwait(false); - } - // If there are no local users with admin rights, make them all admins if (!users.Any(i => i.Policy.IsAdministrator)) { @@ -286,10 +281,10 @@ namespace MediaBrowser.Server.Implementations.Library if (newValue >= maxCount) { - //_logger.Debug("Disabling user {0} due to {1} unsuccessful login attempts.", user.Name, newValue.ToString(CultureInfo.InvariantCulture)); - //user.Policy.IsDisabled = true; + _logger.Debug("Disabling user {0} due to {1} unsuccessful login attempts.", user.Name, newValue.ToString(CultureInfo.InvariantCulture)); + user.Policy.IsDisabled = true; - //fireLockout = true; + fireLockout = true; } await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false); @@ -366,19 +361,6 @@ namespace MediaBrowser.Server.Implementations.Library return users; } - private async Task DoPolicyMigration(User user) - { - if (!user.Configuration.HasMigratedToPolicy) - { - user.Policy.IsAdministrator = user.Configuration.IsAdministrator; - - await UpdateUserPolicy(user, user.Policy, false); - - user.Configuration.HasMigratedToPolicy = true; - await UpdateConfiguration(user, user.Configuration, true).ConfigureAwait(false); - } - } - public UserDto GetUserDto(User user, string remoteEndPoint = null) { if (user == null) @@ -953,8 +935,6 @@ namespace MediaBrowser.Server.Implementations.Library user.Policy = userPolicy; } - user.Configuration.IsAdministrator = user.Policy.IsAdministrator; - await UpdateConfiguration(user, user.Configuration, true).ConfigureAwait(false); } |
