Merge pull request #26 from medarion/master

added config option to disable "edit_alias" function for users
pull/56/head
Christian Boltz 7 years ago committed by GitHub
commit 4d9a0717d0

@ -416,6 +416,10 @@ $CONF['fetchmail'] = 'YES';
// This should be set to NO, except if you *really* trust *all* your users.
$CONF['fetchmail_extra_options'] = 'NO';
// Edit alias
// If you don't want edit alias tab (user mode) set this to 'NO';
$CONF['edit_alias'] = 'YES';
// Header
$CONF['show_header_text'] = 'NO';
$CONF['header_text'] = ':: Postfix Admin ::';

@ -6,10 +6,12 @@
<td>{$tummVacationtext}</td>
</tr>
{/if}
{if $CONF.edit_alias===YES}
<tr>
<td nowrap="nowrap"><a target="_top" href="edit-alias.php">{$PALANG.pUsersMenu_edit_alias}</a></td>
<td>{$PALANG.pUsersMain_edit_alias}</td>
</tr>
{/if}
<tr>
<td nowrap="nowrap"><a target="_top" href="password.php">{$PALANG.change_password}</a></td>
<td>{$PALANG.pUsersMain_password}</td>

@ -4,7 +4,9 @@
{if $CONF.vacation===YES}
<li><a target="_top" href="{#url_user_vacation#}">{$PALANG.pUsersMenu_vacation}</a></li>
{/if}
{if $CONF.edit_alias===YES}
<li><a target="_top" href="{#url_user_edit_alias#}">{$PALANG.pUsersMenu_edit_alias}</a></li>
{/if}
<li><a target="_top" href="{#url_user_password#}">{$PALANG.change_password}</a></li>
<li class="logout"><a target="_top" href="{#url_user_logout#}">{$PALANG.pMenu_logout}</a></li>
</ul>

@ -25,6 +25,12 @@ $smarty->assign ('smarty_template', 'users_edit-alias');
authentication_require_role('user');
$USERID_USERNAME = authentication_get_username();
// is edit-alias support enabled in $CONF ?
if (! Config::bool('edit_alias')) {
header ("Location: main.php");
exit(0);
}
$ah = new AliasHandler();
$ah->init($USERID_USERNAME);
@ -139,4 +145,4 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
?>
?>
Loading…
Cancel
Save