APIv4 - Make LineItem, EntityFinancialTrxn and FinancialTrxn read-only
authorColeman Watts <coleman@civicrm.org>
Tue, 15 Jun 2021 19:04:06 +0000 (15:04 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 15 Jun 2021 22:06:12 +0000 (18:06 -0400)
commitf818ece6f64c2e60b4e829893738941e3bd4288c
tree46c4d48daface9f86dcb7f00a073f6572e8f31c3
parent03436974b930b3da27ecb67f32ed928f98347ef6
APIv4 - Make LineItem, EntityFinancialTrxn and FinancialTrxn read-only

Adds a new ReadOnly trait which annotates write methods as @internal
and sets write permissions to ALWAYS_DENY.

This effectively hides the write actions from the API Explorer,
and restricts use of the write methods to when `checkPermissions = FALSE`.
Civi/Api4/EntityFinancialTrxn.php
Civi/Api4/FinancialItem.php
Civi/Api4/FinancialTrxn.php
Civi/Api4/Generic/Traits/ReadOnly.php [new file with mode: 0644]
Civi/Api4/LineItem.php
tests/phpunit/api/v4/Entity/ConformanceTest.php