+ Start a Discussion
Edwin KEdwin K 

Insufficient Privileges error if View Setup and Configuration profile permission is unchecked

Hi all,

 

I have a question, my case is I two profiles, one for Admin and other for Non Admin.

I have my page and class in Enable visualforce access & Enable apex class access in Non Admin profile.. All fields level security have been checked.. All the Custom Object Permissions hae been checked

 

There is a button call Visualforce page in a custom object.

For Admin profile everything works fine.

 

In Non Admin Profile, if View Setup and Configuration permission is checked, accessing the visualforce page works fine. If View Setup permission is unchecked, I can access to visualforce page but after I select any picklists in visualforce page -> Insufficient Privileges error message is shown

Are there any settings that need to be done? Any suggestions would be great..

 

Thanks

bob_buzzardbob_buzzard

Are you doing anything special in the controller? I've hit this when I've been trying to access the content  of a setup page programmatically inside my controller.

GhilliGhilli

Hi Bob,

 

I have a VF page, apex class and user's profile have access to the page and class.

User can access the page. But when he tries to click custom save button which is on the page, it is giving insufficient priviledge error.

 

I thout this issue would be on object levelpermission. But in insufficient priviledge page when I click back button from the browser it is opening the VF page with the values I entered are saved perfectly.

 

Please help me out on this issue.

 

Apex Save methods:

 

public PageReference saveRecommendation()
        {
        errorMessage = '';
        try
            {
            update recommendation;       
            }
        catch(Exception e)
            {
            system.debug('Error Log - '+e);
            errorMessage = 'Please Fill in Required Detail';
            }
        return null;
        }



public PageReference saveContactPage()
        {
         if(recommendation.PRM_Contacts_Page__c == 'Not Started')
            {
            recommendation.PRM_Contacts_Page__c = 'Partially Completed';
            }
            
        if(bCompleted)
            {
            recommendation.PRM_Contacts_Page__c = 'Completed';
            bCompleted = false;
            }   
        if(bPartiallyCompleted)
            {
            recommendation.PRM_Contacts_Page__c = 'Partially Completed';
            bPartiallyCompleted = false;
            }
        saveRecommendation();
        if(errorMessage.length()> 5  || ApexPages.hasMessages())
            {
                errorMessage = 'Please Fill in Required Detail';
                recommendation.PRM_Contacts_Page__c = 'Partially Completed';
            }            
        
        return null;
        }

 

Visual Force Page sample:

 

 <apex:outputPanel rendered="{! AND(OR(bsystemAdmin,bChannelManagerUser),PRM_Recommendation__c.PRM_Contacts_Page__c != 'Completed')}">
                                <li class="rollover" id="saveBtn" title="save"><apex:commandLink action="{!saveContactPage}" /></li>
                                </apex:outputPanel>

 

venkat,pattapuvenkat,pattapu
Hi Edwin ,

Did you find any solution for your question, I'm also having the same requirement with client, Your piece of answer is appreciatable.

Thanks in Advance ...