Skip to content
Snippets Groups Projects
Commit 19b2a0fe authored by totten's avatar totten
Browse files

CRM-19223 - migrate/(export|import)JSON.php - Require "administer CiviCRM"

parent 202e2654
Branches
Tags
No related merge requests found
......@@ -38,7 +38,11 @@ function run() {
$config = CRM_Core_Config::singleton();
// this does not return on failure
// CRM_Utils_System::authenticateScript( true );
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);
}
$params = array();
require_once 'CRM/Utils/Migrate/ExportJSON.php';
......
......@@ -38,7 +38,10 @@ function run() {
$config = CRM_Core_Config::singleton();
// this does not return on failure
// CRM_Utils_System::authenticateScript( true );
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/ImportJSON.php';
$import = new CRM_Utils_Migrate_ImportJSON();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment