From 1c89bd7a99d9158cbb600d03f84df8369168d82c Mon Sep 17 00:00:00 2001 From: Ralf Becker <ralfbecker@outdoor-training.de> Date: Tue, 7 Jun 2011 11:21:59 +0000 Subject: [PATCH] give Default and Admins group rights for ImportExport on update too --- importexport/setup/tables_update.inc.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/importexport/setup/tables_update.inc.php b/importexport/setup/tables_update.inc.php index 4cc6b8c53d..d32dfea6b9 100755 --- a/importexport/setup/tables_update.inc.php +++ b/importexport/setup/tables_update.inc.php @@ -1,8 +1,8 @@ <?php /** * EGroupware - Setup - * - * @link http://www.egroupware.org + * + * @link http://www.egroupware.org * Created by eTemplates DB-Tools written by ralfbecker@outdoor-training.de * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License @@ -60,11 +60,19 @@ function importexport_upgrade1_9_001() // Not needed - did it wrong return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.002'; } + function importexport_upgrade1_9_002() { $sql = 'UPDATE egw_importexport_definitions SET allowed_users = '. - $GLOBALS['egw_setup']->db->concat("','", 'allowed_users', "','"); - $GLOBALS['egw_setup']->oProc->query($sql, __LINE__, __FILE__); + $GLOBALS['egw_setup']->db->concat("','", 'allowed_users', "','"); + $GLOBALS['egw_setup']->oProc->query($sql, __LINE__, __FILE__); + + // give Default and Admins group rights for ImportExport + foreach(array('Default' => 'Default','Admins' => 'Admin') as $account_lid => $name) + { + $account_id = $GLOBALS['egw_setup']->add_account($account_lid,$name,'Group',False,False); + $GLOBALS['egw_setup']->add_acl('importexport','run',$account_id); + } return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.003'; }