Using the runAs Method in Salesforce | Apex Developer Guide
Blog
in Salesforce Apex
By and large, all Apex code runs in framework mode, where the authorizations and record sharing of the current client are not considered. The framework…