Added config option to disable grant access to all users

This commit is contained in:
jengo 2001-09-09 18:48:20 +00:00
parent b7f969aefe
commit 92a1a669cd
3 changed files with 46 additions and 3 deletions

View File

@ -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 '<center><b>' . lang('Access not permitted') . '</b></center>';
$phpgw->common->phpgw_exit(True);
}
/*
if(isset($save_my_owner) && $phpgw_info['user']['apps']['admin'])
{

View File

@ -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);
}

View File

@ -1,6 +1,6 @@
<!-- BEGIN header -->
<form method="POST" action="{action_url}">
<table border="0" align="center">
<table border="0" align="center" width="85%">
<tr bgcolor="{th_bg}">
<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
</tr>
@ -97,6 +97,17 @@
</select>
</td>
</tr>
<tr bgcolor="{row_off}">
<td>{lang_Deny_all_users_access_to_grant_other_users_access_to_there_entrys ?}:</td>
<td>
<select name="newsettings[deny_user_grants_access]">
<option value="">No</option>
<option value="True"{selected_deny_user_grants_access_True}>Yes</option>
</select>
</td>
</tr>
<!--
<tr bgcolor="{row_off}">
<td>{lang_Default_file_system_space_per_user}/{lang_group_?}:</td>