i have a visual force page and have a controller.i want to restrict access to the controller who have access through grant access through hierarchies.how to do it?
Not sure about your requirement of restricting access to the controller.
If you want the security settings like OWD, Sharing, Hierarchy etc to have impact on the records you are fetching in your controller, then you can declare your class as 'with sharing' which will make sure your controller runs based on the org security settings.
Not sure about your requirement of restricting access to the controller.
If you want the security settings like OWD, Sharing, Hierarchy etc to have impact on the records you are fetching in your controller, then you can declare your class as 'with sharing' which will make sure your controller runs based on the org security settings.