From bc5de52a839e04403d63069a5ed7d5a231f5735b 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 4a78a09888..04ada18ec1 100644 --- a/bin/migrate/export.php +++ b/bin/migrate/export.php @@ -41,6 +41,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 7084639a6a..f432b53da0 100644 --- a/bin/migrate/import.php +++ b/bin/migrate/import.php @@ -48,6 +48,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