+ Start a Discussion
Edwin VijayEdwin Vijay 

Weird: Insufficient Privileges : You do not have the level of access.

Hello All,

 

I have a Visualforce Page which  when viewed as an Admin works fine, the page has a rerender portion when on selecting a value from a drop down a couple of text boxes get rerendered.

 

I logged in as a different user and the page shows up fine, when i change the drop down the rerender gets called and i end up getting the message

 

"Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. "

 

The VF page, the apex class, the extension class, the objects used (have C R E D), all have the permissions for this profile. Also, all fields of the associated objects are visible to this profile.

 

With this error message i am unable to get any clue of what is happening actually, it's just supposed to rerender a few text boxes which are not associated with any access privileages.

 

Moreover, the debug log says "SUCCESS" and all getter and setter methods are called fine. Its only when the page refreshes itself that something goes wrong somewhere.

 

Please let me know your thoughts.

 

Thanks,

Edwin

bob_buzzardbob_buzzard

Is this a regular VF page that is accessed via an authenticated user in the standard UI, or is it something that is used in a portal or site?  

SteveBowerSteveBower

When the action in the controller returns, is it returning a null for a pageReference, or something else?

 

I presume your extension class has "with sharing", do you get a different result if you turn it off?  I'm wondering if the debug log would show you more trace information that way and lead to some clues.

 

I've had this happen recently and it was unexpected just as yours is.  Sadly, I can't recall what I did to fix it.  Best, Steve.

 

p.s. (Editing my reply) Are you doing anything with Approval processes in this page... something is beginning to ring a bell.... (Although I suggest you follow Bob's line of questioning first! :-)  )

lnryanlnryan

When we've encountered this issue it's usually a sharing rules or role hierarchy issue, but it can be hard to pin down. What we usually do to troubleshoot is

  1. Check that the test user has access to the edit the record outside the visualforce page
  2. Check that the refresh doesn't return different information that they may not have access to
  3. Check that the database transaction does not trigger updates or changes to other records
  4. If it does, check that the test user has the permissions to change those

For instance, we had VF page that updated the campaign member records, sometimes the related account, and somtimes created a related opportunity. We discovered that we would run into the issue if

  • marketing failed to reassign the lead of the campaign member to our sales guys
  • the account owner didn't match the contact owner related to the campaign member record
  • someone was helping out a colleague and had more permissive access to the contact than they would to the auto-created opportunities.

Weird and separate as they all were they all showed up as the very uninformative 'Insufficient Privileges' issue. ug.

 

Force.comForce.com

Hi Edwin1,

 

Please make sure that the version settings of visualforce page and its controller/extension is same.

 

Thanks,

Pragati

Big VBig V

Thanks Pragati,

 

it resolved the issue I had.

 

Big V

GhilliGhilli

Hi Big V/ Pragati,

 

I have the issue. I matched the VF page and Apex controller extensions to the same. But I am still getting the insufficient priviledge error.

 

Could you please help me on this issue.

 

Thanks.

Mona ShahidMona Shahid

joice685joice685

Thanks Pragati,

         I too faced the same issue ,the version was not matching in controller .Now Im happy and thanks :)

 

Regards,

Joice