function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rtyanasrtyanas 

Login page on Site - controlling link access

 

I have a Site where I use the Cusomter Portal for logging into SalesForce for authentication.  This seems to be working I can log in using the portal and it seems to be abke to control object accessibility OK.  Now I need more control in a way where depending on successful authentication the user has access to certain links on the Sites page they are on.

 

At the public level the public user will have certain (public) links available but, once successfully logged in the user will have more links available.

 

Thanks,

 

Thomas

bob_buzzardbob_buzzard

If you have a custom/extension controller, you can use the user type to determine if they are logged in or not.  I do it this way:

 

    public String getUserType()  
    {
    	return UserInfo.getUserType();
    }
    
    public Boolean getLoggedInUser()
    {
    	return getUserType()!='Guest';
    }

 Then on my page I conditionally render content based on the value of 'loggedInUser'