I'm looking to implement a site wide redirect to my MVC5 app based on a condition.
I've researched the adding [Authorize] to my base controller but this will not be adequate as my site runs on Windows Authentication but I need to validate that the user is present in a separate, business owned hierarchy that does not connect with AD.
I've researched filters and understand that a custom action filter may be required here. Am I trying to implement this the correct way and where should this be within the project?
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
if(StaffId == 0)
{
filterContext.Result = RedirectToAction("Error");
}
}