mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-13 13:46:24 +00:00
post release housecleaning
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user