SearchKit - Fix permission to access task list
authorColeman Watts <coleman@civicrm.org>
Fri, 6 Aug 2021 15:08:27 +0000 (11:08 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 6 Aug 2021 15:08:27 +0000 (11:08 -0400)
This regressed in 06ea32c, as a new api action was added but permissions were not declared.

ext/search_kit/Civi/Api4/SearchDisplay.php

index fff6f151e6e0d5f9f30fd696fd021dfc468ac9bd..3327eaa36184d13b96baa7f4a2551b0d52aad017 100644 (file)
@@ -32,6 +32,8 @@ class SearchDisplay extends Generic\DAOEntity {
   public static function permissions() {
     $permissions = parent::permissions();
     $permissions['default'] = ['administer CiviCRM data'];
+    $permissions['getSearchTasks'] = ['access CiviCRM'];
+    // Permission for run action is checked internally
     $permissions['run'] = [];
     return $permissions;
   }