diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-06-15 10:01:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-15 10:01:55 +0100 |
| commit | 862bcdba67d3b992fc7e68a7428fc225c898fce3 (patch) | |
| tree | 10a66c6cc918962cd2dad54fe85c65016af9cf9d /MediaBrowser.Api/Sessions/SessionService.cs | |
| parent | 4d50941d4458dc93880d99192fd1c26a8f625d66 (diff) | |
| parent | 100e9d586dff877610c488936aa035f61f6fedb5 (diff) | |
Merge pull request #23 from jellyfin/master
updating
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)); } |
