When a user logs on, I check if there is a return url, and if so I redirect to it, as per the MVC application template.
if (!String.IsNullOrEmpty(returnUrl))
{
return Redirect(returnUrl);
}
How would I check if this URL was valid (routes to a controller/action), and the user has permission to access it?
My actions are all protected using the standard authorize attribute.
Thanks for your help,
Stew
Copyright Notice:Content Author:「stew」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/1807604/check-if-user-has-permission-to-access-a-url-for-use-with-logon-return-url