Developer forum

Forum » Dynamicweb 10 » Redirect after login property inheritance

Redirect after login property inheritance

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,
I have a situation where I need to set a Redirect after login at the User Group level.
My expectation is that the value for this property would be inherited to user level.
meaning that User.FrontendStartPage would return the value from the user (if set) or from one of the Parent User groups.
In my case, I only set it on one User group.
Is this how it's supposed to work?
Any other way I can read the value set on the UserGroup?

Thank you,
Adrian


Replies

   
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,
This was the expected outcome.
What I was asking is if I should expect that the API would return the FrontEndPage set on the Usergroup.
The logic for Login is not handled in the template.
I believe that I got my answer from the source code. The login logic uses AuthenticationHandler.GetUserStartPage(User user), but this method is private. Which means that I should duplicate the logic if I want to access the value in the template.

Thank you,
Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

FrontEndPage property on the user returns what is set on the user....? I do not understand - or you where thinking it should return one of those set on a parent group? It does not, nor should it.

>The logic for Login is not handled in the template.
I do not understand what that means - it should not be handled in the template.

If you want the logic from logic from the login handler in the template you should do that your self. Are you sure that is even needed?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,
There are a few situations where a Sales user can impersonate users from different countries. Each country has a different Website.
When the normal user logs in, the redirect does the job.
But when the user gets impersonated, that logic does not kick in, and I need to handle it in the template.
But I believe that I got what I need now. You are right, the FrontEndPage property on the user should return the value set on the user without any inheritance. My expectation was wrong.
 

Thank you,
Adrian

 

 

You must be logged in to post in the forum