public override void OnAuthorization(AuthorizationContext filterContext) { // Do whatever checking you need here var auth = new Models.Authorization(); if (auth.Users.Count > 0) { filterContext.Result = new HttpUnauthorizedResult(); } }