diff options
| author | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-06-19 23:33:43 -0500 |
|---|---|---|
| committer | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-06-19 23:33:43 -0500 |
| commit | e2f16fc2551592541846c2bd34f27773f33aae7e (patch) | |
| tree | ca418d874f9b8c1bb33099cacbe23706fe4763f1 /MediaBrowser.Api/Sessions/SessionService.cs | |
| parent | 329980c727cf03587ff5f4011a3af3ef2fa5e4f1 (diff) | |
| parent | e8e5208fbd9484a1b37eed5dece524f108886fe0 (diff) | |
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'MediaBrowser.Api/Sessions/SessionService.cs')
| -rw-r--r-- | MediaBrowser.Api/Sessions/SessionService.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Sessions/SessionService.cs b/MediaBrowser.Api/Sessions/SessionService.cs index 020bb5042..50adc5698 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; @@ -45,14 +46,14 @@ namespace MediaBrowser.Api.Sessions public string Id { get; set; } /// <summary> - /// Artist, Genre, Studio, Person, or any kind of BaseItem + /// Artist, Genre, Studio, Person, or any kind of BaseItem. /// </summary> /// <value>The type of the item.</value> [ApiMember(Name = "ItemType", Description = "The type of item to browse to.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] public string ItemType { get; set; } /// <summary> - /// Artist name, genre name, item Id, etc + /// Artist name, genre name, item Id, etc. /// </summary> /// <value>The item identifier.</value> [ApiMember(Name = "ItemId", Description = "The Id of the item.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] @@ -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)); } |
