aboutsummaryrefslogtreecommitdiff
path: root/Emby.Notifications/Api/NotificationsService.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-05-12 22:10:35 -0400
committerPatrick Barron <barronpm@gmail.com>2020-05-12 22:10:35 -0400
commit9ad839c7766bd5d6121a10b2c306d6fef9666c52 (patch)
tree47833157e6b40eba243a937b8c93b4bec11de9dd /Emby.Notifications/Api/NotificationsService.cs
parenta78184ef4423be8e320f642eb7b0155810d86cbd (diff)
Initial migration code
Diffstat (limited to 'Emby.Notifications/Api/NotificationsService.cs')
-rw-r--r--Emby.Notifications/Api/NotificationsService.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Emby.Notifications/Api/NotificationsService.cs b/Emby.Notifications/Api/NotificationsService.cs
index 788750796..221db5423 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;
@@ -164,7 +165,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(p => p.Permissions.Select(x => x.Kind).Contains(PermissionKind.IsAdministrator))
+ .Select(p => p.Id)
+ .ToArray()
};
return _notificationManager.SendNotification(notification, CancellationToken.None);