aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Filters
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
committerBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
commit52194f56b5f07e3ae01e2fb6d121452e37d1e93f (patch)
treefd638972f72ec49734ad07f831a3aae3b2501a1d /Jellyfin.Server/Filters
parentc7d50d640e614a3c13699e3041fbfcb258861c5a (diff)
Replace != null with is not null
Diffstat (limited to 'Jellyfin.Server/Filters')
-rw-r--r--Jellyfin.Server/Filters/SecurityRequirementsOperationFilter.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Filters/SecurityRequirementsOperationFilter.cs b/Jellyfin.Server/Filters/SecurityRequirementsOperationFilter.cs
index 077908895..4af670e9a 100644
--- a/Jellyfin.Server/Filters/SecurityRequirementsOperationFilter.cs
+++ b/Jellyfin.Server/Filters/SecurityRequirementsOperationFilter.cs
@@ -22,7 +22,7 @@ namespace Jellyfin.Server.Filters
foreach (var attribute in context.MethodInfo.GetCustomAttributes(true))
{
if (attribute is AuthorizeAttribute authorizeAttribute
- && authorizeAttribute.Policy != null
+ && authorizeAttribute.Policy is not null
&& !requiredScopes.Contains(authorizeAttribute.Policy, StringComparer.Ordinal))
{
requiredScopes.Add(authorizeAttribute.Policy);
@@ -31,12 +31,12 @@ namespace Jellyfin.Server.Filters
// Add controller scopes if any.
var controllerAttributes = context.MethodInfo.DeclaringType?.GetCustomAttributes(true);
- if (controllerAttributes != null)
+ if (controllerAttributes is not null)
{
foreach (var attribute in controllerAttributes)
{
if (attribute is AuthorizeAttribute authorizeAttribute
- && authorizeAttribute.Policy != null
+ && authorizeAttribute.Policy is not null
&& !requiredScopes.Contains(authorizeAttribute.Policy, StringComparer.Ordinal))
{
requiredScopes.Add(authorizeAttribute.Policy);