Oauth - Move CUD permissions to the BAO
authorColeman Watts <coleman@civicrm.org>
Wed, 8 Jun 2022 15:17:40 +0000 (11:17 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 18 Jul 2022 20:32:49 +0000 (16:32 -0400)
commit0b11bc2d70a14395b5251d851f46de629f39a6f1
tree0c0c4ad24d8d79bda83bf44cdf4a1c52c1e35531
parentee0d82c6681c1f26bc7f08367127712fc2298a36
Oauth - Move CUD permissions to the BAO

This ensures permissions are checked regardless of the api version or action being performed.
It also consolidates the code used to check access so that the API checkAccess action will
stay consistently and always perform the same access checks as the other api actions.
ext/oauth-client/CRM/OAuth/BAO/OAuthContactToken.php
ext/oauth-client/Civi/Api4/Action/OAuthContactToken/Create.php [deleted file]
ext/oauth-client/Civi/Api4/Action/OAuthContactToken/Delete.php [deleted file]
ext/oauth-client/Civi/Api4/Action/OAuthContactToken/OnlyModifyOwnTokensTrait.php [deleted file]
ext/oauth-client/Civi/Api4/Action/OAuthContactToken/Update.php [deleted file]
ext/oauth-client/Civi/Api4/OAuthContactToken.php
ext/oauth-client/tests/phpunit/Civi/OAuth/AuthCodeFlowTest.php
ext/oauth-client/tests/phpunit/api/v4/OAuthContactTokenTest.php