+ Start a Discussion
Tom Maple2Tom Maple2 

How do I retrieve Visualforce page permissions for a profile?

I have a Visualforce page that acts as a menu to other Visualforce pages. I want to use the rendered attribute to decide whether an <apex:outputLink> is displayed based on the logged in user's Profile permissions. Something like this:

<apex:outputLink value="/apex/myPrivilegedPage" rendered="{!whatDoIPutHere}">My Privileged Page</apex:outputLink>
Best Answer chosen by Tom Maple2
Ramu_SFDCRamu_SFDC
I guess you would have to write a method in the controller by querying for the user permissions and send a boolean value to rendered attribute. See if the below post helps you in any way

http://salesforce.stackexchange.com/questions/40683/how-do-i-find-out-if-a-user-has-access-to-a-visualforce-page-through-apex

All Answers

Ramu_SFDCRamu_SFDC
I guess you would have to write a method in the controller by querying for the user permissions and send a boolean value to rendered attribute. See if the below post helps you in any way

http://salesforce.stackexchange.com/questions/40683/how-do-i-find-out-if-a-user-has-access-to-a-visualforce-page-through-apex
This was selected as the best answer
Tom Maple2Tom Maple2
Thanks Ramu. That post on stackexchange did provide the answer. I had never heard of the SetupEntityAccess object, nor the ApexPage object.