From b924262b2f986319942715dd8e00c65d7c8db022 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 30 Mar 2011 08:00:14 +0000 Subject: [PATCH] * give everyone implicit rights for home app, as taking them away makes to many support problems --- admin/inc/class.uiaccounts.inc.php | 4 ++-- phpgwapi/inc/class.egw.inc.php | 2 +- setup/admin_account.php | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 0c96aee799..c99987cded 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -1200,7 +1200,7 @@ $availableApps = $GLOBALS['egw_info']['apps']; foreach($availableApps as $app => $data) { - if (!$data['enabled'] || !$data['status'] || $data['status'] == 3) + if (!$data['enabled'] || !$data['status'] || $data['status'] == 3 || $app == 'home') { unset($availableApps[$app]); // do NOT show disabled apps, or our API (status = 3) } @@ -1520,7 +1520,7 @@ $availableApps = $GLOBALS['egw_info']['apps']; foreach($availableApps as $app => $data) { - if (!$data['enabled'] || !$data['status'] || $data['status'] == 3) + if (!$data['enabled'] || !$data['status'] || $data['status'] == 3 || $app == 'home') { unset($availableApps[$app]); // do NOT show disabled apps, or our API (status = 3) } diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php index 23ae3e2703..f8b88eaeb5 100644 --- a/phpgwapi/inc/class.egw.inc.php +++ b/phpgwapi/inc/class.egw.inc.php @@ -342,7 +342,7 @@ class egw extends egw_minimal { $this->currentapp = $GLOBALS['egw_info']['flags']['currentapp']; // some apps change it later - if ($GLOBALS['egw_info']['flags']['currentapp'] != 'about') + if ($GLOBALS['egw_info']['flags']['currentapp'] != 'home') // give everyone implicit home rights { // This will need to use ACL in the future if (!$GLOBALS['egw_info']['user']['apps'][$currentapp = $GLOBALS['egw_info']['flags']['currentapp']] || diff --git a/setup/admin_account.php b/setup/admin_account.php index 2d08d4dda3..fc3302d54e 100644 --- a/setup/admin_account.php +++ b/setup/admin_account.php @@ -118,13 +118,12 @@ else } // Group perms for the default group - $GLOBALS['egw_setup']->add_acl(array('addressbook','calendar','infolog','felamimail','filemanager','preferences','home','manual','groupdav','notifications','syncml'),'run',$defaultgroupid); + $GLOBALS['egw_setup']->add_acl(array('addressbook','calendar','infolog','felamimail','filemanager','preferences','manual','groupdav','notifications','syncml'),'run',$defaultgroupid); $apps = array(); - $GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table,'app_name','app_enabled < 3',__LINE__,__FILE__); - while ($GLOBALS['egw_setup']->db->next_record()) + foreach($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table,'app_name','app_enabled < 3',__LINE__,__FILE__) as $row) { - $apps[] = $GLOBALS['egw_setup']->db->f('app_name'); + $apps[] = $row['app_name']; } // if not otherwise selected, give admin only access to the rest of the default apps, // not yet set for the default group or development only apps like (etemplate, jinn, tt's)