From 92a1a669cd038d7fd4a6d555942230211459ee7a Mon Sep 17 00:00:00 2001 From: jengo Date: Sun, 9 Sep 2001 18:48:20 +0000 Subject: [PATCH] Added config option to disable grant access to all users --- preferences/acl_preferences.php | 25 +++++++++++++++++++++++- preferences/index.php | 11 ++++++++++- preferences/templates/default/config.tpl | 13 +++++++++++- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/preferences/acl_preferences.php b/preferences/acl_preferences.php index 8c1c21e731..a85fac56ac 100644 --- a/preferences/acl_preferences.php +++ b/preferences/acl_preferences.php @@ -11,7 +11,13 @@ /* $Id$ */ - $phpgw_flags = Array( + if (! $acl_app) + { + $acl_app = 'preferences'; + $acl_app_not_passed = True; + } + + $phpgw_flags = array( 'currentapp' => $acl_app, 'enable_nextmatchs_class' => True, 'noappheader' => True, @@ -28,6 +34,23 @@ $phpgw_info['flags'] = $phpgw_flags; include('../header.inc.php'); + + if ($acl_app_not_passed) + { + $GLOBALS['phpgw']->log->message(array( + 'text' => 'F-BadmenuactionVariable, failed to pass acl_app.', + 'line' => __LINE__, + 'file' => __FILE__ + )); + $GLOBALS['phpgw']->log->commit(); + } + + if ($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) + { + echo '
' . lang('Access not permitted') . '
'; + $phpgw->common->phpgw_exit(True); + } + /* if(isset($save_my_owner) && $phpgw_info['user']['apps']['admin']) { diff --git a/preferences/index.php b/preferences/index.php index d677e1085d..cd051c6a60 100755 --- a/preferences/index.php +++ b/preferences/index.php @@ -101,7 +101,16 @@ global $pref_tpl; $pref_tpl->set_var('pref_link',$pref_link); - $pref_tpl->set_var('pref_text',$pref_text); + + if (strtolower($pref_text) == 'grant access' && $GLOBALS['phpgw_info']['server']['deny_user_grants_access']) + { + return False; + } + else + { + $pref_tpl->set_var('pref_text',$pref_text); + } + $pref_tpl->parse('rows','link_row',True); } diff --git a/preferences/templates/default/config.tpl b/preferences/templates/default/config.tpl index 49fc4d03ac..4f5b0ccc53 100644 --- a/preferences/templates/default/config.tpl +++ b/preferences/templates/default/config.tpl @@ -1,6 +1,6 @@
- +
@@ -97,6 +97,17 @@ + + + + + +
 {title}
{lang_Deny_all_users_access_to_grant_other_users_access_to_there_entrys ?}: + +