diff options
| author | aled <aled@wibblr.com> | 2020-06-16 19:30:00 +0100 |
|---|---|---|
| committer | aled <aled@wibblr.com> | 2020-06-16 19:30:23 +0100 |
| commit | 05f736defb9b045ace57262d19ec3691414f8bfc (patch) | |
| tree | add6734a2275aeaa887d459153c7bab4b18ff61a /MediaBrowser.Api/Sessions/SessionService.cs | |
| parent | c722ad22ece5ee7dd68b41521c2716a50364f42a (diff) | |
| parent | 100e9d586dff877610c488936aa035f61f6fedb5 (diff) | |
Merge branch 'master' into check-stored-password-exists
# Conflicts:
# Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
Diffstat (limited to 'MediaBrowser.Api/Sessions/SessionService.cs')
| -rw-r--r-- | MediaBrowser.Api/Sessions/SessionService.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Sessions/SessionService.cs b/MediaBrowser.Api/Sessions/SessionService.cs index 020bb5042..d986eea65 100644 --- a/MediaBrowser.Api/Sessions/SessionService.cs +++ b/MediaBrowser.Api/Sessions/SessionService.cs @@ -2,6 +2,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data.Enums; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Library; @@ -326,12 +327,12 @@ namespace MediaBrowser.Api.Sessions var user = _userManager.GetUserById(request.ControllableByUserId); - if (!user.Policy.EnableRemoteControlOfOtherUsers) + if (!user.HasPermission(PermissionKind.EnableRemoteControlOfOtherUsers)) { result = result.Where(i => i.UserId.Equals(Guid.Empty) || i.ContainsUser(request.ControllableByUserId)); } - if (!user.Policy.EnableSharedDeviceControl) + if (!user.HasPermission(PermissionKind.EnableSharedDeviceControl)) { result = result.Where(i => !i.UserId.Equals(Guid.Empty)); } |
