function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TemesgennnTemesgennn 

Use with sharing for @AuraEnabled Apex controllers with Implicit Sharing

Hi There,


I have been tasked to handle a test for release updates which is (Make Flows Respect Access Modifiers for Legacy Apex Actions). I am new to development and this is my first release updates testing, no idea where to start or what to do. 

How can assess the impact of this release update?
Ensure that all your @AuraEnabled Apex code explicitly controls sharing behavior using the with sharing or without sharing keywords. If all your @AuraEnabled code explicitly sets sharing behavior, this update has no effect.

Any help would be much appreciated, Thank you.

Best Answer chosen by Temesgennn
AnudeepAnudeep (Salesforce Developers) 
First and foremost, Apex classes without a sharing declaration are insecure by default

You need to ensure all your apex classes especially the ones referred in your lightning component that have @auraEnabled annotation have either with or without sharing keywords. Note that If all your @AuraEnabled code explicitly sets sharing behavior, this update has no effect.

You can find the class from the Developer Console > Search In Files option

When you click on Get Started while testing critical update, you will get more details and instructions as to how to test this update

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you

All Answers

AnudeepAnudeep (Salesforce Developers) 
First and foremost, Apex classes without a sharing declaration are insecure by default

You need to ensure all your apex classes especially the ones referred in your lightning component that have @auraEnabled annotation have either with or without sharing keywords. Note that If all your @AuraEnabled code explicitly sets sharing behavior, this update has no effect.

You can find the class from the Developer Console > Search In Files option

When you click on Get Started while testing critical update, you will get more details and instructions as to how to test this update

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
This was selected as the best answer
TemesgennnTemesgennn
Thank you so much Anudeep!