title: If User.IsInRole with string array?
body: <p>Im trying to build a custom validation where I check if the role contains a user. And I'm having problems with string array, what is best way to check if it contains a specific value?</p>
  
  <pre><code>    public string[] AuthRoles { get; set; }
  
  
      public override void OnActionExecuting(ActionExecutingContext filterContext)
      {
  
          if (AuthRoles.Length &gt; 0)
          {
  
              if (!filterContext.HttpContext.User.Identity.IsAuthenticated)
              {
  
                 RedirectToRoute(filterContext,
                 new
                 {
                     controller = "AdminLogin",
                     action = "AdminLogin"
                 });
  
              }
              else
              {
                  bool isAuthorized = filterContext.HttpContext.User.IsInRole(this.AuthRoles.??);
  
                  if (!isAuthorized)
                      throw new UnauthorizedAccessException("You are not authorized to view this page");
              }
          }
          else
          {
              throw new InvalidOperationException("No Role Specified");
          }
  </code></pre>
  
  <p>How should I modify the check for User.IsInRole so it handles the array? </p>