You need to sign in to do that
Don't have an account?

authorization Required error
I have created a site that I will use for internal employees who do not have salesforce. I have set this up but for whatever reason I cannot access any account info.
http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail?id=0013000000GfdxRAAR - this page throws the authentication error
http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail - this loads fine but with no data
I have set the permission for all of the objects. I feel like I have checked everything I know to check.. what am I doing wrong?!!
Let me know if you need more details.
I notice you have the 'with sharing' keywords in the controller. That tells the controller to respect the sharing rules for the current user, which is a guest user with no role. Thus unless you have the org wide default set to public read/write, the site guest user will only be able to see accounts that it owns, which is probably none.
You won't be able see opportunities from a site guest user, as the license doesn't have access to that sobject type.
All Answers
Authorization required often means that the platform is trying to send you to an error page, but that requires you to be logged into Salesforce to view it.
Have you tried previewing as admin? That will show you any errors that would otherwise be swallowed.
Yes, I have and all that is shows is that I need to stop viewing as admin. This works fine as a vf page when logged into SF, just in force.com sites that it does not. I have turned on debug logs for the site and before I get the Auth required pag the logs shows
I am not sure what it means. I have looked it up, but still confused. I have set all of the permissions to read/create for all standard objects and set every field to read only. I have set all custom objects to read and made all fields visible (all of this for troubleshooting - at first I just had what I thought I needed). I have enabled all apex classes and all vf pages.
The degug logs shows that everything succeeded. So, I am really at a loss here. Do I need to post the code?
@bob_buzzard
Let me give some more information - maybe I just don't understand how force.com sites work. Do you have to authenticate someone to let them see data from salesforce? It seems unlikely, as one page works just fine and shows me data. Here is the code for a page that does not work in force.com sites (guest users), but works perfectly otherwise. (For authenticated users). When users go to this page they should see a list of accounts. I have enabled the vf page and the controller for the guest user. As well as permissions to read accounts, and view all fields. The debug log shows no errors. It seems like a permission issue - but I just cannot imagine what I am missing. There is one other pge that does not work either, it references many more objects (related to account - opps, cases, contacts, etc. but I thought I would start with getting help with this page and hopefully learn something I can apply to the other. Any help is appreciated.
Controller:
Apex Page
I notice you have the 'with sharing' keywords in the controller. That tells the controller to respect the sharing rules for the current user, which is a guest user with no role. Thus unless you have the org wide default set to public read/write, the site guest user will only be able to see accounts that it owns, which is probably none.
You won't be able see opportunities from a site guest user, as the license doesn't have access to that sobject type.
Bob,
Thanks for that. Something so easy that I missed over and over again. Can you take a look at the page for the one I am getting the authorization required error? I tried removing the opportunities section but I was still getting the error. I added it back in for the purposes of showing what it looked like. TIA
VF
So much depends on your configuration I'm afraid. The way I usually handle these is to comment out all of the markup and then gradually re-introduce sections and see where it breaks.
I was able to get this resolved. I ended up creating a public group and then editing the sharing rules. Bob, thanks for helping me, you are a huge asset for SF developers, especially those, like me, who are learning as we go.
Could you explain me clearly what is the resolution you did,I've the same problem suffering.So after crating public group,what we have to do?
Thanks
Rajkumar