diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-10-26 18:50:19 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-10-26 18:50:19 -0400 |
| commit | 35778ebc02e5931142a1fe31a256b7488a07c5c2 (patch) | |
| tree | ced0290be8820f5e507b51ca4c5165212b1879d1 /MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs | |
| parent | c0dc8d055bfd4d2f58591083beb9e9128357aad6 (diff) | |
| parent | 8d77308593c3b16b733b0109323770d9dfe7e166 (diff) | |
Merge pull request #1222 from MediaBrowser/dev
3.0.5768.7
Diffstat (limited to 'MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs b/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs index 56cb52f10..4a625f0fb 100644 --- a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs +++ b/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs @@ -3,10 +3,11 @@ using MediaBrowser.Controller.Notifications; using MediaBrowser.Model.Notifications; using System.Threading; using System.Threading.Tasks; +using System; namespace MediaBrowser.Server.Implementations.Notifications { - public class InternalNotificationService : INotificationService + public class InternalNotificationService : INotificationService, IConfigurableNotificationService { private readonly INotificationsRepository _repo; @@ -36,6 +37,24 @@ namespace MediaBrowser.Server.Implementations.Notifications public bool IsEnabledForUser(User user) { + return user.Policy.IsAdministrator; + } + + public bool IsHidden + { + get { return true; } + } + + public bool IsEnabled(string notificationType) + { + if (notificationType.IndexOf("playback", StringComparison.OrdinalIgnoreCase) != -1) + { + return false; + } + if (notificationType.IndexOf("newlibrarycontent", StringComparison.OrdinalIgnoreCase) != -1) + { + return false; + } return true; } } |
