You need to sign in to do that
Don't have an account?
Ketan Solanki29
Controller with @RemoteAction not enforcing with sharing
Hell Guys,
I use "with sharing" keyword with class where i added @RemoteAction method but it not enforcing permissions, means it retriving all records rather than the user have access only records in query written inside the class method.
Thanks in Advance,
Ketan Solanki
I use "with sharing" keyword with class where i added @RemoteAction method but it not enforcing permissions, means it retriving all records rather than the user have access only records in query written inside the class method.
Thanks in Advance,
Ketan Solanki
In API releases up to 29, if a @RemoteAction method was called on a class that didn’t explicitly declare with sharing or without sharing, the method ran as though the class was declared with sharing. In other words, the default behavior was different for methods depending on whether they were invoked as part of a standard Visualforce request or a JavaScript remoting request. This wasn’t intended behavior.
Beginning with API 30.0, requests execute consistently, regardless of how the class is declared, or how the method is invoked:
Please refer the below link for more info :-
https://releasenotes.docs.salesforce.com/en-us/spring14/release-notes/rn_vf_remoting_apex_mode.htm
Hope it helps.. :)
http://salesforce.stackexchange.com/questions/11482/sharing-without-sharing-and-remoteaction
I used "with sharing" keyword in controller when i use the @RemoteAction method which is controller for the Visualforce Component. also used "with sharing" keyword in controller of visualforce page where i am calling @RemoteAction method using JavaScript ( JavaScript Remoting ) but still the controller fetching records which user diden't have access.
I used "with sharing" keyword in controller when i use the @RemoteAction method which is controller for the Visualforce Component. also used "with sharing" keyword in controller of visualforce page where i am calling @RemoteAction method using JavaScript ( JavaScript Remoting ) but still the controller fetching records which user diden't have access.
It's my mistake , by mistake was calling wrong Visualforce Component whoes controller doesn't have "with sharing" keyword in class defination. corrected the controller and now issue is fixed.
Thanks for the help