diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-06-18 18:47:44 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-06-18 18:56:10 -0400 |
| commit | be88efce3cbbd357142a75f109258d6c7be398b4 (patch) | |
| tree | df8a0bf9d5e108d45a473edd8121a9af91ca6a0d /Emby.Server.Implementations/HttpServer/Security/SessionContext.cs | |
| parent | 336ba2879f325a4efd52bc7737ce94f40369bfeb (diff) | |
| parent | c791c3a215b33bd4ca534c9f383c9fd7d23b59af (diff) | |
Merge branch 'master' into authenticationdb-efcore
# Conflicts:
# Emby.Server.Implementations/Devices/DeviceManager.cs
# Emby.Server.Implementations/HttpServer/Security/SessionContext.cs
# Emby.Server.Implementations/Security/AuthenticationRepository.cs
# Emby.Server.Implementations/Session/SessionManager.cs
# Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
# MediaBrowser.Controller/Library/IUserManager.cs
# MediaBrowser.Controller/Net/ISessionContext.cs
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/Security/SessionContext.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/Security/SessionContext.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs index cd1b9cba0..a7647caf9 100644 --- a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs @@ -43,14 +43,14 @@ namespace Emby.Server.Implementations.HttpServer.Security return GetSession((HttpContext)requestContext); } - public async Task<User> GetUser(HttpContext requestContext) + public async Task<User?> GetUser(HttpContext requestContext) { var session = await GetSession(requestContext).ConfigureAwait(false); return session == null || session.UserId.Equals(Guid.Empty) ? null : _userManager.GetUserById(session.UserId); } - public Task<User> GetUser(object requestContext) + public Task<User?> GetUser(object requestContext) { return GetUser(((HttpRequest)requestContext).HttpContext); } |
