Closed chazwatkins closed 1 year ago
@daveespo As requested, I incorporated the changes from #434 into #419. Let me know if you have any questions.
Hi @daveespo - Should I update this pull request to include the builder style methods in master? Or has it been decided to not include them in the API?
Hi @chazwatkins -- I didn't explicitly close out this PR -- it was implicitly closed when I merged the branch it targeted. Can you reopen it and target it at master
? There is some good stuff in here I'd like to merge. I'm not sure if the withSystemMode and withUserMode convenience methods are going to make it but there are some other things in here that need to come over (i.e. getFLSEnforcement() on QueryFactory, etc.)
Don't go changing anything in this branch yet. First, we want to get PR #437 and your #436 merged in .. and those will create merge conflicts with this branch .. let's sort out what we want to keep and what should get removed on this PR after those other two PRs are merged
Sounds good. I'll wait for the other PRs to get merged and submit this one to master
Add
withUserMode()
andwithSystemMode()
tofflib_SObjectSelector
andfflib_QueryFactory
fflib_QueryFactory
Specify
WITH USER_MODE
Specify
WITH SYSTEM_MODE
Salesforce uses
SYSTEM_MODE
as the default operation mode when not specified in the query.withSystemMode()
allows users to make their queries explicit if desired.Switch back to
LEGACY
orNONE
fflib_SObjectSelector
isEnforcingFLS()
andisEnforcingCRUD()
now consider theDataAccess
to determine their result instead of directly returning the values ofm_enforceFLS
andm_enforceCRUD
. This allows the user to get the correct state from the methods, regardless if they are using legacy enforcement or one of the new operation modes.Specify
USER_MODE
Specify
SYSTEM_MODE
Switch back to
LEGACY
Add
fflib_QueryFactory
fflib_SObjectSelector
Change
fflib_QueryFactoryTest
fflib_SObjectSelector
enforceFLS()
to setm_dataAccess
toLEGACY
setDataAccess()
to revertm_enforceCRUD
to true whenm_dataAccess
isLEGACY
isEnforcingFLS()
to return true whenm_dataAccess
is set toUSER_MODE
isEnforcingCRUD()
to return true whenm_dataAccess
is set toUSER_MODE
fflib_SObjectSelectorTest
This change is![Reviewable](https://reviewable.io/review_button.svg)