You need to sign in to do that
Don't have an account?
baller4life7
ACCESS rights for vf page based on user roles/groups
Hey guys,
I already know that one can set access rights for vf pages based on user profiles. But what is the best and quickest way to set access rights based on user roles/groups?
Thank you
Josh
Here's my final solution:
Controller:
Visualforce Page:
Works for me! :)
All Answers
Don't think there is any way that salesforce provides for Setting Access right on Pages. You have to use your own way like using a custom seeting where you can set and render a message insuffiecient priviledges according to custom setting.
Thank you for your fast answer!
Would you recommend a controller with a boolean property and a boolean method that checks whether the current user is in a certain role/group?
How can I forward the user to a specific site ( something like "Sorry, no access rights!" ), if the user is not in that certain role/group?
You can have a page level action in this you will check the rights and if user does not have you can just navigate user to some other page showing "Sorry, no authorization!" .
Thanks for your answer!
I'm quiet new to Salesforce.com. Please give me a small code example how that could look like!
Thank you
Josh
Here's my final solution:
Controller:
Visualforce Page:
Works for me! :)
HI friends,
In my application i have requirement for one visulaforce page like if supervisor logins,need to display the entire header component of the page along with the managers records and the employees under that manager.if manager logins,need to display all the employees under him and if employee logins,no need to show the header.
Please help me..i am unable to write the SOQL query to fetch id's.