From 83102bed0e46b4edfd9e0e367d73c2776abe8332 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 29 Jun 2002 15:59:37 +0000 Subject: [PATCH] GNU Patch #379. --- admin/inc/hook_acl_manager.inc.php | 31 +++++++++++++++++++++++- admin/inc/hook_admin.inc.php | 24 +++++++++++++++---- admin/inc/hook_config.inc.php | 6 +++-- admin/index.php | 38 ++++++++++++++++++++---------- admin/setup/phpgw_en.lang | 6 ++++- admin/setup/phpgw_fi.lang | 2 +- admin/setup/phpgw_fr.lang | 2 +- admin/setup/phpgw_ja.lang | 2 +- 8 files changed, 86 insertions(+), 25 deletions(-) diff --git a/admin/inc/hook_acl_manager.inc.php b/admin/inc/hook_acl_manager.inc.php index 0f975878cb..171fa2ef67 100644 --- a/admin/inc/hook_acl_manager.inc.php +++ b/admin/inc/hook_acl_manager.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ $GLOBALS['acl_manager']['admin']['site_config_access'] = array( - 'name' => 'Deny to site configuration', + 'name' => 'Deny access to site configuration', 'rights' => array( 'List config settings' => 1, 'Change config settings' => 2 @@ -94,3 +94,32 @@ 'Kill session' => 8 ) ); + + $GLOBALS['acl_manager']['admin']['access_log_access'] = array( + 'name' => 'Deny access to session log', + 'rights' => array( + 'Show session log' => 1 + ) + ); + + $GLOBALS['acl_manager']['admin']['error_log_access'] = array( + 'name' => 'Deny access to error log', + 'rights' => array( + 'Show error log' => 1 + ) + ); + + $GLOBALS['acl_manager']['admin']['appreg_access'] = array( + 'name' => 'Deny access to application registery', + 'rights' => array( + 'Register applications' => 1 + ) + ); + + $GLOBALS['acl_manager']['admin']['info_access'] = array( + 'name' => 'Deny access to phpinfo', + 'rights' => array( + 'Show phpinfo()' => 1 + ) + ); + diff --git a/admin/inc/hook_admin.inc.php b/admin/inc/hook_admin.inc.php index d3be114426..95a4e9c055 100644 --- a/admin/inc/hook_admin.inc.php +++ b/admin/inc/hook_admin.inc.php @@ -51,12 +51,26 @@ $file['View Sessions'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions'); } - /* These need to be added still */ - $file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history'); - $file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log'); - $file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boapplications.register_all_hooks'); - $file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')"; //$GLOBALS['phpgw']->link('/admin/phpinfo.php'); + if (! $GLOBALS['phpgw']->acl->check('access_log_access',1,'admin')) + { + $file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history'); + } + if (! $GLOBALS['phpgw']->acl->check('error_log_access',1,'admin')) + { + $file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log'); + } + + if (! $GLOBALS['phpgw']->acl->check('appreg_access',1,'admin')) + { + $file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boapplications.register_all_hooks'); + } + + if (! $GLOBALS['phpgw']->acl->check('info_access',1,'admin')) + { + $file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')"; //$GLOBALS['phpgw']->link('/admin/phpinfo.php'); + } + /* Do not modify below this line */ display_section('admin','admin',$file); ?> diff --git a/admin/inc/hook_config.inc.php b/admin/inc/hook_config.inc.php index e97d3dc922..1705e7945b 100644 --- a/admin/inc/hook_config.inc.php +++ b/admin/inc/hook_config.inc.php @@ -24,7 +24,8 @@ $algos = @mcrypt_list_algorithms(); $found = False; - while(list($key, $value) = each($algos)) + $out = ''; + while(list($key,$value) = each($algos)) { $found = True; /* Only show each once - seems this is a problem in some installs */ @@ -69,7 +70,8 @@ $modes = @mcrypt_list_modes(); $found = False; - while(list($key, $value) = each($modes)) + $out = ''; + while(list($key,$value) = each($modes)) { $found = True; /* Only show each once - seems this is a problem in some installs */ diff --git a/admin/index.php b/admin/index.php index 65af04cc86..1e4db6d98e 100755 --- a/admin/index.php +++ b/admin/index.php @@ -19,9 +19,11 @@ include('../header.inc.php'); $GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $GLOBALS['admin_tpl']->set_file(array( - 'admin' => 'index.tpl' - )); + $GLOBALS['admin_tpl']->set_file( + Array( + 'admin' => 'index.tpl' + ) + ); $GLOBALS['admin_tpl']->set_block('admin','list'); $GLOBALS['admin_tpl']->set_block('admin','app_row'); @@ -46,7 +48,7 @@ else { $GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True); - } + } } function section_item($pref_link='',$pref_text='') @@ -54,7 +56,7 @@ $GLOBALS['admin_tpl']->set_var('pref_link',$pref_link); $GLOBALS['admin_tpl']->set_var('pref_text',$pref_text); $GLOBALS['admin_tpl']->parse('rows','link_row',True); - } + } function section_end() { @@ -63,16 +65,26 @@ function display_section($appname,$title,$file) { - section_start($title,$GLOBALS['phpgw']->common->image($appname, - Array('navbar',$appname,'nonav') - ),$appname - ); - - while(list($text,$url) = each($file)) + if(is_array($file)) { - section_item($url,lang($text)); + section_start($title, + $GLOBALS['phpgw']->common->image( + $appname, + Array( + 'navbar', + $appname, + 'nonav' + ) + ), + $appname + ); + + while(list($text,$url) = each($file)) + { + section_item($url,lang($text)); + } + section_end(); } - section_end(); } $GLOBALS['phpgw']->hooks->process('admin'); diff --git a/admin/setup/phpgw_en.lang b/admin/setup/phpgw_en.lang index 2e63b43590..aba8e4a70c 100644 --- a/admin/setup/phpgw_en.lang +++ b/admin/setup/phpgw_en.lang @@ -44,14 +44,18 @@ create group admin en Create Group default file system space per user admin en Default file system space per user default file system space per user/group ? admin en Default file system space per user/group ? deny access to applications admin en Deny access to applications +deny access to application registery admin en Deny access to application registery deny access to current sessions admin en Deny access to current sessions +deny access to error log admin en Deny access to error log deny access to global categories admin en Deny access to global categories deny access to groups admin en Deny access to groups deny access to mainscreen message admin en Deny access to mainscreen message deny access to peer servers admin en Deny access to peer servers +deny access to phpinfo admin en Deny access to phpinfo +deny access to session log admin en Deny access to session log +deny access to site configuration admin en Deny access to site configuration deny access to user accounts admin en Deny access to user accounts deny all users access to grant other users access to their entries ? admin en Deny all users access to grant other users access to their entries ? -deny to site configuration admin en Deny to site configuration display admin en Display do you also want to delete all global subcategories ? admin en Do you also want to delete all global subcategories ? edit application admin en Edit application diff --git a/admin/setup/phpgw_fi.lang b/admin/setup/phpgw_fi.lang index c42503b58b..b25af83fdb 100644 --- a/admin/setup/phpgw_fi.lang +++ b/admin/setup/phpgw_fi.lang @@ -48,9 +48,9 @@ deny access to global categories admin fi Est deny access to groups admin fi Estä pääsy ryhmiin deny access to mainscreen message admin fi Estä pääsy päänäytön viestiin deny access to peer servers admin fi Estä pääsy rinnakkaispalvelimille +deny access to site configuration admin fi Estä pääsy palvelun asetuksiin deny access to user accounts admin fi Estä pääsy käyttäjätunnuksiin deny all users access to grant other users access to their entries ? admin fi Estä kaikilta käyttäjiltä tietojensa julkistaminen? -deny to site configuration admin fi Estä pääsy palvelun asetuksiin display admin fi Näytä do you also want to delete all global subcategories ? admin fi Haluatko poistaa myös yleiset alaluokat? edit application admin fi Muokkaa sovellusta diff --git a/admin/setup/phpgw_fr.lang b/admin/setup/phpgw_fr.lang index e44b8f0fba..d1979dbbbf 100644 --- a/admin/setup/phpgw_fr.lang +++ b/admin/setup/phpgw_fr.lang @@ -49,9 +49,9 @@ deny access to global categories admin fr Refuser l'acc deny access to groups admin fr Refuser l'accès aux groupes deny access to mainscreen message admin fr Refuser l'accès au message de la page principale deny access to peer servers admin fr Refuser l'accès aux serveurs pairs +deny access to site configuration admin fr Refuser l'accès à la configuration du site deny access to user accounts admin fr Refuser l'accès aux comptes utilisateurs deny all users access to grant other users access to their entries ? admin fr Les utilisateurs ne peuvent permettre aux autres l'accès à leurs données ? -deny to site configuration admin fr Refuser l'accès à la configuration du site display admin fr Afficher do you also want to delete all global subcategories ? admin fr Voulez-vous aussi effacer toutes les sous-catégories globales ? edit application admin fr Modifier l'application diff --git a/admin/setup/phpgw_ja.lang b/admin/setup/phpgw_ja.lang index 0d1f450e10..3a82b0b5f8 100644 --- a/admin/setup/phpgw_ja.lang +++ b/admin/setup/phpgw_ja.lang @@ -54,7 +54,7 @@ deny access to applications admin ja deny access to global categories admin ja ¥°¥í¡¼¥Ð¥ë¥«¥Æ¥´¥ê¤ÎÀ©¸Â deny access to mainscreen message admin ja ¥á¥¤¥ó²èÌÌ¥á¥Ã¥»¡¼¥¸Êѹ¹¤ÎÀ©¸Â deny access to current sessions admin ja ¥»¥Ã¥·¥ç¥ó¤ÎÀ©¸Â -deny to site configuration admin ja ¥µ¥¤¥È´Ä¶­ÀßÄê¤ÎÀ©¸Â +deny access to site configuration admin ja ¥µ¥¤¥È´Ä¶­ÀßÄê¤ÎÀ©¸Â disabled admin ja ÉÔ²Ä display admin ja ɽ¼¨ edit account admin ja ¥¢¥«¥¦¥ó¥ÈÄûÀµ