CRM-19223 - migrate/move.php - Require "administer CiviCRM"
authorTim Otten <totten@civicrm.org>
Thu, 11 Aug 2016 23:53:54 +0000 (16:53 -0700)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 17 Aug 2016 05:17:14 +0000 (15:17 +1000)
bin/migrate/move.php

index 4711dc5d83cbaeb69762368f782bff6211f31b3b..0e16a9458c0ffbfdbf42239d4469687b13c1879a 100644 (file)
@@ -42,6 +42,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/Core/BAO/ConfigSetting.php';
   $moveStatus = CRM_Core_BAO_ConfigSetting::doSiteMove();