You need to sign in to do that
Don't have an account?
Authorization for Sites
Hello All,
I have created a site, I have a page called testLogged, which will be accessed by logged in user.
But when I hit http://devsitepratik-developer-edition.ap1.force.com/testLogged this url directly
in browser without login then I can see the dashboard which is wrong.
So I have used below code for authorization,
if(UserInfo.getName().contains('Guest'))
return page.ErrorPage;
but I think I need a better logic for this, so can anybody help me to resolve my queries.
1. Why this is happened? Is it because of portal guest user?
2. Is there any Better logic available for this?
Thanks in advance.
regards,
Pratty
Hi,
In the Active Site home page select the same VisualForce page and click on save.
i think it will works. let me know if any query
This sounds like you have made that page available to the site guest profile - is that the case?
Hi,
I got my answer I am using getType() method of UserInfo class now.
By the way thanks for your time.
regards,
Pratty