From 202e2654b7af1f793f9b7e20b0219281b5f0da2b Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 11 Aug 2016 16:51:23 -0700 Subject: [PATCH] CRM-19223 - migrate/(export|import).php - Require "administer CiviCRM" --- bin/migrate/export.php | 3 +++ bin/migrate/import.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/migrate/export.php b/bin/migrate/export.php index ad2c73bdd1..e91af7e16d 100644 --- a/bin/migrate/export.php +++ b/bin/migrate/export.php @@ -39,6 +39,9 @@ function run() { // this does not return on failure CRM_Utils_System::authenticateScript(TRUE); + if (!CRM_Core_Permission::check('administer CiviCRM')) { + CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE); + } require_once 'CRM/Utils/Migrate/Export.php'; $export = new CRM_Utils_Migrate_Export(); diff --git a/bin/migrate/import.php b/bin/migrate/import.php index a51b3ebce0..03fba67ab7 100644 --- a/bin/migrate/import.php +++ b/bin/migrate/import.php @@ -46,6 +46,9 @@ function run() { // this does not return on failure CRM_Utils_System::authenticateScript(TRUE); + if (!CRM_Core_Permission::check('administer CiviCRM')) { + CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE); + } require_once 'CRM/Utils/Migrate/Import.php'; $import = new CRM_Utils_Migrate_Import(); -- 2.25.1