aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/NotificationsController.cs
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2020-06-14 22:50:49 -0400
committerGitHub <noreply@github.com>2020-06-14 22:50:49 -0400
commitcf9223b8cb2f1ebccf20cb1dcd99d19b78cf3e61 (patch)
tree95ec837fa654622732ba950859190bb3a16b8619 /Jellyfin.Api/Controllers/NotificationsController.cs
parente2b2f74b47cc1d281c0819795b83f8d49d1f3b09 (diff)
parent524243a9340bfccd2c9ae708be70a5e49f5f53f1 (diff)
Merge pull request #3340 from crobibero/api-migration-merge
Merge master into api-migration
Diffstat (limited to 'Jellyfin.Api/Controllers/NotificationsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/NotificationsController.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/NotificationsController.cs b/Jellyfin.Api/Controllers/NotificationsController.cs
index 5af194756..a76675d5a 100644
--- a/Jellyfin.Api/Controllers/NotificationsController.cs
+++ b/Jellyfin.Api/Controllers/NotificationsController.cs
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Jellyfin.Api.Models.NotificationDtos;
+using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Notifications;
using MediaBrowser.Model.Dto;
@@ -115,7 +116,10 @@ namespace Jellyfin.Api.Controllers
Description = description,
Url = url,
Level = level ?? NotificationLevel.Normal,
- 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(),
Date = DateTime.UtcNow,
};