SearchKit - Enable super-admins to disable Search Display access checks
authorColeman Watts <coleman@civicrm.org>
Tue, 15 Jun 2021 06:25:51 +0000 (02:25 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 15 Jun 2021 17:40:41 +0000 (13:40 -0400)
commit5623bf2a4a5f32235400a19afa66a7220ff2ecba
treedeaff8bd088747decd9c4513426c00a81da5c166
parent259207d064db3dbd7a8cd85d1dda84192a66b5a5
SearchKit - Enable super-admins to disable Search Display access checks

This allows users with 'all CiviCRM permissions and ACLs' to configure a search display
to bypass permission checks and display all records to the user.

Once a display is set to bypass ACLs, it can only be edited by a super-admin,
ordinary admin users will not be able to edit the display or the saved search.

Such a display will not automatically appear on its own page; it must be
embedded in an Afform, and the Afform will act as gatekeeper for users
to view the display.
14 files changed:
Civi/Api4/Utils/CoreUtil.php
css/civicrm.css
ext/search_kit/CRM/Search/BAO/SearchDisplay.php
ext/search_kit/Civi/Api4/Action/SearchDisplay/Run.php
ext/search_kit/ang/crmSearchAdmin.ang.php
ext/search_kit/ang/crmSearchAdmin.module.js
ext/search_kit/ang/crmSearchAdmin/crmSearchAdminDisplay.component.js
ext/search_kit/ang/crmSearchAdmin/crmSearchAdminDisplay.html
ext/search_kit/ang/crmSearchAdmin/searchList.controller.js
ext/search_kit/ang/crmSearchAdmin/searchList.html
ext/search_kit/css/crmSearchAdmin.css
ext/search_kit/search_kit.php
ext/search_kit/tests/phpunit/api/v4/SearchDisplay/SearchRunTest.php
tests/phpunit/api/v4/Traits/CheckAccessTrait.php