aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-01 00:23:34 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-01 00:23:34 -0400
commitddbbe9ce4e054565272a69e1ea709f8df4d96479 (patch)
treeffa400a985dfd9ff4a2d43e113c7c6dad92cb2f4 /MediaBrowser.Server.Implementations
parent2626b6f3729097e083f381936738d17335f48f1c (diff)
post release housecleaning
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserManager.cs26
-rw-r--r--MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs2
3 files changed, 5 insertions, 25 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
index 3903c62b1..b4da40702 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
@@ -140,7 +140,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
return true;
}
- return _config.Configuration.InsecureApps8.Contains(auth.Client ?? string.Empty,
+ return _config.Configuration.InsecureApps9.Contains(auth.Client ?? string.Empty,
StringComparer.OrdinalIgnoreCase);
}
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);
}
diff --git a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs
index 5e02b2bac..1ff928cd5 100644
--- a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs
+++ b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs
@@ -95,7 +95,7 @@ namespace MediaBrowser.Server.Implementations.Notifications
var config = GetConfiguration();
return _userManager.Users
- .Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N"), i.Configuration))
+ .Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N"), i.Policy))
.Select(i => i.Id.ToString("N"));
}