From: Tim Otten Date: Thu, 11 Aug 2016 23:51:23 +0000 (-0700) Subject: CRM-19223 - migrate/(export|import).php - Require "administer CiviCRM" X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc5de52a839e04403d63069a5ed7d5a231f5735b;p=civicrm-core.git CRM-19223 - migrate/(export|import).php - Require "administer CiviCRM" --- 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();