diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-06-15 20:21:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-15 20:21:25 +0900 |
| commit | dabb869a6b9f1c3359a663fd6b6e380f882e2ae2 (patch) | |
| tree | 64dbd5a55d0a400f195c8de58d835739e82b9b74 /Emby.Notifications/Api/NotificationsService.cs | |
| parent | b79957d07eeda3c888d0ec2051bb4185a410ac0e (diff) | |
| parent | 100e9d586dff877610c488936aa035f61f6fedb5 (diff) | |
Merge branch 'master' into hwaccel
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); |
