diff options
| author | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-18 14:27:51 -0500 |
|---|---|---|
| committer | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-18 14:27:51 -0500 |
| commit | 3a61c9a878110485c2e5385d0260959beefeb9d4 (patch) | |
| tree | 732723860e099ce655b2b9d04ecdb20d9c83e9ee /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | df65e3ab0db8fd55a6a02b8c067565abc926136f (diff) | |
| parent | e14c85555c6e906175a77c96e96180baf95964a5 (diff) | |
Merge remote-tracking branch 'upstream/master' into access-control
Diffstat (limited to 'MediaBrowser.Model/Notifications/NotificationOptions.cs')
| -rw-r--r-- | MediaBrowser.Model/Notifications/NotificationOptions.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 79a128e9b..9c54bd70e 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System; -using MediaBrowser.Model.Extensions; +using System.Linq; using MediaBrowser.Model.Users; namespace MediaBrowser.Model.Notifications @@ -81,8 +81,12 @@ namespace MediaBrowser.Model.Notifications { foreach (NotificationOption i in Options) { - if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) return i; + if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) + { + return i; + } } + return null; } @@ -98,7 +102,7 @@ namespace MediaBrowser.Model.Notifications NotificationOption opt = GetOptions(notificationType); return opt == null || - !ListHelper.ContainsIgnoreCase(opt.DisabledServices, service); + !opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase); } public bool IsEnabledToMonitorUser(string type, Guid userId) @@ -106,7 +110,7 @@ namespace MediaBrowser.Model.Notifications NotificationOption opt = GetOptions(type); return opt != null && opt.Enabled && - !ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString("")); + !opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase); } public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy) @@ -125,7 +129,7 @@ namespace MediaBrowser.Model.Notifications return true; } - return ListHelper.ContainsIgnoreCase(opt.SendToUsers, userId); + return opt.SendToUsers.Contains(userId, StringComparer.OrdinalIgnoreCase); } return false; |
