Fix dev/core#4971 - Skip redundant permission checks in CRM_Admin_Form_ScheduleReminders
authorcolemanw <coleman@civicrm.org>
Wed, 7 Feb 2024 03:15:14 +0000 (22:15 -0500)
committercolemanw <coleman@civicrm.org>
Wed, 7 Feb 2024 03:15:14 +0000 (22:15 -0500)
commit08e8e4c65b5e9ac214d4c6b06a03f5f9279c6bc1
tree92cf0619abd1fb4d2d6f3827d8ba8c1486bb1fba
parent04d7f50bf70fb54f2ecfff6e8bd5991c4be57887
Fix dev/core#4971 - Skip redundant permission checks in CRM_Admin_Form_ScheduleReminders

Temporary override to solve https://lab.civicrm.org/dev/core/-/issues/4971
This regressed in https://github.com/civicrm/civicrm-core/pull/27003 which
switched $this->retrieveMethod to 'api' - this had the unintended effect of checking
permissions during retrieveValues(), but the API is not sophisticated enough: we need to
add
a `CRM_Core_BAO_ActionSchedule::addSelectWhereClause()` function that can handle the logic
of "if the reminder is for an event, check user has edit permission for that specific
event".

Meanwhile we can skip permission checks in the form layer, because that logic is
implemented here,
specifically in `\CRM_Event_ActionMapping::checkAccess()`.
CRM/Admin/Form/ScheduleReminders.php