Expand CustomValue::_checkAccess()
authorTim Otten <totten@civicrm.org>
Wed, 9 Jun 2021 10:24:21 +0000 (03:24 -0700)
committerColeman Watts <coleman@civicrm.org>
Wed, 9 Jun 2021 18:23:44 +0000 (14:23 -0400)
commitb87406e2cd0706f292248bdd1374cc9a8e795692
tree7146a2056287333e2a148ad13512c1e5c1e3fee3
parent70da392777d9c663ea79755b43cfec2e347b5f04
Expand CustomValue::_checkAccess()

Before: Reports that access is available based one delegated-check for `Contact.update`

After: Reports that access is available based on multiple checks:

  1. The user must have access to the relevant CustomGroup (by way of ACL or perms)
  2. The user must have acces to the underlying entity (by way of checkAccessDelgated)

Comments: I did a bit of testing with `Custom_*.get`, and it does seem to
give access to single-value CustomGroups. So I removed a comment about
multi-value CustomGroups and expanded to a larger list of entities.
CRM/Core/BAO/CustomValue.php