Version: Version 9.3 (build 51899)
Rule: csharpsquid:S2589 Boolean expressions should not be gratuitous
bool hasAuthorize =
context.MethodInfo.DeclaringType?.GetCustomAttributes(true).OfType<AuthorizeAttribute>().Any() ?? false
|| context.MethodInfo.GetCustomAttributes(true).OfType<AuthorizeAttribute>().Any();
