You need to sign in to do that
Don't have an account?
vlad_BL
Insufficient Privileges
Hi, guys.
I need help with very strange issue.
Let me describe it.
I'm developing now some VF Page for Customer Portal. There is a simple button in this page, and its' handler does not execute any DML.
It just collects information and returns to the same page.
So, when I click the button, I totally randomly get one of two results:
- Everything works fine, and there is no any warning or exception in debug log
- I see standard text of Insufficient Privileges exception instead of the page content (though I remain on the same page), and debug log is totally clear – no warnings, no exceptions.
Below you can find the code of handler method
public Pagereference addCnt() { famAvailable = new List<Selectoption>(); famAvailable.add(new Selectoption('', '--None--')); cntAvailable = new List<Selectoption>(); for(String fmId : famIdMap.keySet()) { famAvailable.add(new Selectoption(fmId, famIdMap.get(fmId))); } mode = 'new'; Apexpages.currentPage().getParameters().put('sesId', SessionId); return null; }
Class is created with sharing
I will really appreciate your help.
Hi vlad_BL,
Some steps to be covered :
1) Make sure your visulforce page and apex class is added in Customer Portal Profile.
2) Make sure that the object you are putting the query and getting the results should have tallest "read" rights for customer portal profile.
If you still face the same problem please explain bit more with some code snippets/scenarios.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
All Answers
Hmm, thats strange as there is no DML operation.
Anyways, its worth checking if the vf page and the controller class are enabled for your profile?
Afzal
Hi vlad_BL,
Some steps to be covered :
1) Make sure your visulforce page and apex class is added in Customer Portal Profile.
2) Make sure that the object you are putting the query and getting the results should have tallest "read" rights for customer portal profile.
If you still face the same problem please explain bit more with some code snippets/scenarios.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Thanks, Arora
The problem was in permissions of access to some custom object that I queried instances from.
Its access was not set correctly for use with Customer Portal.