Created
August 27, 2018 18:32
-
-
Save choudharymanish8585/8486e9e04ec5c7f78ad921082c790917 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class will run in with sharing context if | |
* -It is visualforce page controller | |
* -It is entrypoint in the transaction (like api) | |
* This class will run in without sharing context if | |
* -It is being called from another class having without shring permission | |
**/ | |
public inherited sharing class InheritedSharing{ | |
public List<Contact> getAllTheSecrets(){ | |
return [SELECT Name FROM Contact]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment