set setupuser before updating import/export definitions
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 20 Jun 2017 13:03:28 +0000 (15:03 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 20 Jun 2017 16:03:01 +0000 (18:03 +0200)
Change-Id: I360d5ba6ba6a235c042af295daec0b386ee6c4a4
Reviewed-on: http://gerrit.tine20.com/customers/4911
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Setup/Frontend/Cli.php

index c7d1bf4..3440d57 100644 (file)
@@ -383,6 +383,12 @@ class Setup_Frontend_Cli
      * Update Import Export Definitions for all applications
      */
     protected function _updateAllImportExportDefinitions(Zend_Console_Getopt $_opts){
+
+        $setupUser = Setup_Update_Abstract::getSetupFromConfigOrCreateOnTheFly();
+        if (! Tinebase_Core::getUser() instanceof Tinebase_Model_User) {
+            Tinebase_Core::set(Tinebase_Core::USER, $setupUser);
+        }
+
         //get all applications
         $applications = Tinebase_Application::getInstance()->getApplications(NULL, 'id');
         foreach ($applications as $application) {