Try our conversational search powered by Generative AI!

Newbie question regarding design pattern for given problem

Vote:
 

Hello

I'm a newbie of Epi server and I have a question how to solve this scenario in best way.

Lets say a visitor want to visit page X, if current visitor is not logged in then s/he will get to page X but if s/he is logged in then s/he will be dispatched to a page Y. I dont want to have this control i.e if the visitor is logged in current page X and then dispatch the visitor to page Y I would rather administrate this scenario in a more central place for example in edit or admin mode. I wonder if there is any design pattern or other possible solution that can solve this?

I would be glad if anyone could help me 

Thanks in advance!

/Mi

#35453
Dec 10, 2009 21:25
Vote:
 

Hi Mi,

One idea would be to add the redirect code and then put a boolean property on the pagetype that you check before running the code.

Pseudo code:

if(bool is set)

redirect

 

That way you can administrate what pagetypes should have the boolean and then in edit mode you administer if the page should redirect or not.

#35753
Dec 22, 2009 16:07
Vote:
 

Is Page Y the login page for the site?  If so, could you manage this through ASP.Net membership?  It would redirect if the user wasn't authenticated.

#35900
Jan 06, 2010 17:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.