dev/core#690 - Civi\API - Fix entity permission check for trusted calls
authorPatrick Figel <pfigel@greenpeace.org>
Mon, 4 Feb 2019 15:00:03 +0000 (16:00 +0100)
committerPatrick Figel <pfigel@greenpeace.org>
Mon, 4 Feb 2019 15:00:03 +0000 (16:00 +0100)
commitb0558c215a036e34d99c230c431c55e2becb79b4
treef23cd7ced2737d3ab4223d742242142c4c0e0a20
parent62531d8d4291f29e23c6b91fe2f8f9ad4d3c2706
dev/core#690 - Civi\API - Fix entity permission check for trusted calls

This changes the permission check in DynamicFKAuthorization to
short-circuit on trusted API calls (check_permissions = 0) so that
no exception is thrown when it's used with entities that are not
allowed delegates.
Civi/API/Subscriber/DynamicFKAuthorization.php
tests/phpunit/Civi/API/Subscriber/DynamicFKAuthorizationTest.php