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
Btuitasi1Btuitasi1 

Locking Force.com Community pages based on login

I have a fully visualforce styled community site with a custom login page and logout button. The login and logout functions work, but if I logout, I can still access the site by typing in the URL of a supposedly "locked down" page. How do I prevent this from happening?

Thanks!
Wizno @ ConfigeroWizno @ Configero
Make sure that you're fully logged out of salesforce. Sometimes this happens when you login as a user while also logged in as an admin. 

Also, check the security settings for the Site Guest User and make sure that the page is not enabled for the Site Guest User. It's most likely related to the VF page being exposed for public viewing when it shouldn't be. 
Btuitasi1Btuitasi1
I've managed to get all but one of my pages locked down. I think it has to do with my controller. It is:
public with sharing class topIdeaExt {
           
    public List<Idea> getRecent2()
    {
        return [SELECT Id, Title, CreatedBy.Name, Voting_Status__c, CreatedDate, VoteTotal FROM Idea WHERE Voting_Status__c = 'Active' order by createdDate desc Limit 10];
    }
    public List<Idea> getMostVoted2()
    {
        return [SELECT Id, Title, CreatedBy.Name, Voting_Status__c, CreatedDate, VoteTotal FROM Idea WHERE Voting_Status__c = 'Active' order by VoteTotal desc, CreatedDate desc Limit 10];
    }
    public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by CreatedById, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
    
    public topIdeaExt() {}
      // This locks down the page to unregistered users.
    public PageReference forwardToCustomAuthPage() {
        if(UserInfo.getUserType() == 'Guest'){
            return new PageReference('IdeaCenter/IdeaCenterLogin');
        }
        else{
            return null;
        }
    }
}

Any idea where I can clean this up?

Thanks!