Defer inline checks when processing relationships
Resolves #2986
Description
This defers inline checks in the ActivePermissionExecutor when processing relationships.
- Added a
deferInlineChecksvariable in theRequestScope - Modified
ActivePermissionExecutorto also take into consideration thedeferInlineChecksvariable - Modified
JsonApiAtomicOperationsandJsonApiJsonPatchto set defer inline checks to true when post processing relationships.
Motivation and Context
Previously it was possible for two separate consecutive updates to succeed but when the same updates were bundled into a atomic operation or json patch request were failing due to permissions checks.
How Has This Been Tested?
Added the appropriate tests.
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
I think the build test failure might be transient as I can't seem to replicate the failure of example.tests.AsyncTest locally.
I think the build test failure might be transient as I can't seem to replicate the failure of
example.tests.AsyncTestlocally.
restarted the build