protected override bool AuthorizeCore(HttpContextBase httpContext) { var userManager = InjectionContainer.Get <IUserManager>(); if (!userManager.IsLoggedIn) { return(false); } var roles = userManager.CurrentUser.Bonde.Rolles.Select(r => r.Kode); return(RolesArray.Any(roles.Contains)); }