Add sharing declaration to classes
Closed this issue · 0 comments
LawrenceLoz commented
Expected Behavior
Sharing behaviour of all classes should be explicit, and framework should encourage best practices in terms of record sharing in apex.
Actual Behavior
- Framework classes do not specify sharing, so when called from a trigger will (I think) run without sharing and call concrete action classes to run without sharing if keywords are omitted in these too
- Treatment of classes with no sharing declaration could change in future
Suggest using "with sharing" for MetadataTriggerManager (feels safest to default to this, and without sharing override can be added in trigger actions) and "inherited sharing" for all other classes.
Steps to Reproduce the Problem
n/a
Specifications
- Version: Master branch at 16 Feb
- Platform: