public override void OnActionExecuting(ActionExecutingContext context) { context.Result = new UnauthorizedObjectResult("user is unauthorized"); }