What I want to do is to define restrict access for some users with specific roles, which I did it using the permissions. After the user login successfully, I need to show a specific web panel to the user who has a specific role, in other words, I need to set a home page for the user role.
Example:
I have in my project two types of users, Seller, and Customer. and each of them has specific roles and permissions.
After the Seller login, we want to show to him his account information, wherein the customer login, we want to show him the categories and items to make a purchase.
I tried to define Home Object through GAM Application, but it's still not working.
If you use GAM, in the login web panel after authentication you can use something like this:
&URL = GAMRepository.GetLastErrorsURL()
//If &URL.IsEmpty()
// GAMRepository.ApplicationGoHome(GAMInternalGUIDs.AppGAMUserBackend)
//Else
// Link(&URL)
do case
case GamUser.CheckRoleByExternalId(!"is_seller")
SellerHome.Link()
case GamUser.CheckRoleByExternalId(!"is_customer")
CustomerHome.Link()
case GamUser.CheckRoleByExternalId(!"is_gam_administrator")
GamHome.Link()
otherwise
Home.Link()
endcase
//Endif
In the roles you must set the External Code "is_seller" for Seller, etc.