Fix search display access for non-admin users
authorColeman Watts <coleman@civicrm.org>
Tue, 10 Aug 2021 20:53:48 +0000 (16:53 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 11 Aug 2021 04:42:55 +0000 (00:42 -0400)
commit144025ae90306d7ca403fd2bb8269d474aadbb2e
tree5a68a197d1b50dfba904ad65a8bbf13ebdcfbb68
parent11986605c00f6ab0e879145c700a85317d55a0e8
Fix search display access for non-admin users

Non-admin users should be allowed to view any search display that doesn't have permission checks disabled;
for those displays that disable permission checks, non-admins will only be able to view it if embedded in an afform.

Fixes dev/core#2737
Civi/Api4/SavedSearch.php
ext/search_kit/Civi/Api4/SearchDisplay.php
ext/search_kit/tests/phpunit/api/v4/SearchDisplay/SearchRunTest.php