mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-26 18:54:48 +03:00
Only usermanager should have access to the userrepository
This commit is contained in:
@@ -43,11 +43,6 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
/// </summary>
|
||||
private readonly IUserDataManager _userDataRepository;
|
||||
|
||||
/// <summary>
|
||||
/// The _user repository
|
||||
/// </summary>
|
||||
private readonly IUserRepository _userRepository;
|
||||
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
@@ -99,11 +94,10 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
|
||||
private readonly SemaphoreSlim _sessionLock = new SemaphoreSlim(1, 1);
|
||||
|
||||
public SessionManager(IUserDataManager userDataRepository, ILogger logger, IUserRepository userRepository, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager)
|
||||
public SessionManager(IUserDataManager userDataRepository, ILogger logger, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager)
|
||||
{
|
||||
_userDataRepository = userDataRepository;
|
||||
_logger = logger;
|
||||
_userRepository = userRepository;
|
||||
_libraryManager = libraryManager;
|
||||
_userManager = userManager;
|
||||
_musicManager = musicManager;
|
||||
@@ -253,8 +247,7 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
{
|
||||
try
|
||||
{
|
||||
// Save this directly. No need to fire off all the events for this.
|
||||
await _userRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false);
|
||||
await _userManager.UpdateUser(user).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user