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 /Emby.Notifications/Api/NotificationsService.cs | |
| parent | 4d50941d4458dc93880d99192fd1c26a8f625d66 (diff) | |
| parent | 100e9d586dff877610c488936aa035f61f6fedb5 (diff) | |
Merge pull request #23 from jellyfin/master
updating
Diffstat (limited to 'Emby.Notifications/Api/NotificationsService.cs')
| -rw-r--r-- | Emby.Notifications/Api/NotificationsService.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Emby.Notifications/Api/NotificationsService.cs b/Emby.Notifications/Api/NotificationsService.cs index 788750796..1ff8a5026 100644 --- a/Emby.Notifications/Api/NotificationsService.cs +++ b/Emby.Notifications/Api/NotificationsService.cs @@ -8,6 +8,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data.Enums; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Notifications; @@ -149,9 +150,7 @@ namespace Emby.Notifications.Api [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "request", Justification = "Required for ServiceStack")] public object Get(GetNotificationsSummary request) { - return new NotificationsSummary - { - }; + return new NotificationsSummary(); } public Task Post(AddAdminNotification request) @@ -164,7 +163,10 @@ namespace Emby.Notifications.Api Level = request.Level, Name = request.Name, Url = request.Url, - UserIds = _userManager.Users.Where(i => i.Policy.IsAdministrator).Select(i => i.Id).ToArray() + UserIds = _userManager.Users + .Where(user => user.HasPermission(PermissionKind.IsAdministrator)) + .Select(user => user.Id) + .ToArray() }; return _notificationManager.SendNotification(notification, CancellationToken.None); |
