From 2333f7900064c3c07cffe9b5e59c63383fb3ea32 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Thu, 18 May 2023 15:22:25 -0400 Subject: [PATCH] Create export mappings without admin perms --- CRM/Core/Permission.php | 6 ++++++ ang/exportui.ang.php | 1 - ang/exportui/export.html | 2 +- ang/exportui/exportui.js | 3 --- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 2a412f526a..7d8a61c5d8 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -1516,6 +1516,12 @@ class CRM_Core_Permission { 'access CiviCRM', ], ]; + $permissions['mapping'] = [ + 'default' => [ + 'access CiviCRM', + ], + ]; + $permissions['mapping_field'] = $permissions['mapping']; $permissions['saved_search'] = [ 'default' => ['administer CiviCRM data'], diff --git a/ang/exportui.ang.php b/ang/exportui.ang.php index f340a018f6..cb0871ed30 100644 --- a/ang/exportui.ang.php +++ b/ang/exportui.ang.php @@ -13,7 +13,6 @@ return [ 'ang/exportui', ], 'basePages' => [], - 'permissions' => ['administer CiviCRM'], 'requires' => [ 'crmUi', 'crmUtil', diff --git a/ang/exportui/export.html b/ang/exportui/export.html index 2cca22fc9e..8a3e093619 100644 --- a/ang/exportui/export.html +++ b/ang/exportui/export.html @@ -19,7 +19,7 @@ - + diff --git a/ang/exportui/exportui.js b/ang/exportui/exportui.js index b39b13b6af..3365124314 100644 --- a/ang/exportui/exportui.js +++ b/ang/exportui/exportui.js @@ -24,9 +24,6 @@ contact_type: '', columns: [] }; - $scope.perms = { - admin: CRM.checkPerm('administer CiviCRM') - }; // For the "add new field" dropdown $scope.new = {col: ''}; var contactTypes = _.transform($scope.contact_types, function (result, type) { -- 2.25.1