Last post Jul 24, 2007 12:25 AM by mickyjtwin
Jul 23, 2007 10:06 PM|mickyjtwin|LINK
In my OnBeginRequest method, I am doing a url re-write. If i move through the url, and check to see if modules exist from that url, I want to then see if the user requsting this is authorized to view it. Can I do that check in OnBeginRequest? I didn't think
the user was set up yet. WOuld I have to load the modules from the url first, then authorize the user against those modules?
Jul 24, 2007 12:25 AM|mickyjtwin|LINK
To expand, I want to grab the url being requested.
I want to then get the view part, and see if the user is authorized to view that view. If they are, then continue to the section. Try and authorize for that section and so on. This way, it would cut down on checks, instead of loading all of them, then authorizing.
So my question is can I do that in OnBeginRequest, or should I move it to
void app_AuthorizeRequest(object sender, EventArgs e)
Can I do the context.rewritepath(url) from
void app_PreRequestHandlerExecute(object sender, EventArgs e) at the end? That way, I can do all the checks and rewrite the path to whatever.
Thanks in advance,