-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Power to allow/disallow the Object/Field Level Security checks #38
Comments
Hi @vt89. By default Query.apex will only show a warning when seeing a missing permission on fields or objects, so that it will not break your code from running. In addition, there are methods to turn the warning into an exception.
Calling the method
If user has no read permission on the field 'Name', it would throws an exception. Also, one can turn the exception back to warning by calling Meantime, there is a global switch:
Once it's set, all Query instances will follow the global switch, unless the instance has defined its own instance switch. Hope these will help. |
Regarding the enforceGlobalSecurity for every class, I would have to call it at the beggining of every AuraEnabled method, every trigger, batch, web service..., right? Or I could have static block with calling this function in every single class. Will there be any option to enable/disable the security by default for the whole org? E.g. the query would load the default value from custom settings? Thanks! |
Hi @kratoon3, calling Having a custom setting is something that I've had in mind. It's just introducing custom settings would increase complexity for user installation. Let me know if |
No description provided.
The text was updated successfully, but these errors were encountered: