diff --git a/config.inc.php b/config.inc.php index 4c9c5332..cb4fc56c 100644 --- a/config.inc.php +++ b/config.inc.php @@ -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 ::'; diff --git a/templates/users_main.tpl b/templates/users_main.tpl index 43f35905..339dbdbd 100644 --- a/templates/users_main.tpl +++ b/templates/users_main.tpl @@ -6,10 +6,12 @@ {$tummVacationtext} {/if} +{if $CONF.edit_alias===YES} {$PALANG.pUsersMenu_edit_alias} {$PALANG.pUsersMain_edit_alias} +{/if} {$PALANG.change_password} {$PALANG.pUsersMain_password} diff --git a/templates/users_menu.tpl b/templates/users_menu.tpl index 412b079c..ff14391d 100644 --- a/templates/users_menu.tpl +++ b/templates/users_menu.tpl @@ -4,7 +4,9 @@ {if $CONF.vacation===YES}
  • {$PALANG.pUsersMenu_vacation}
  • {/if} +{if $CONF.edit_alias===YES}
  • {$PALANG.pUsersMenu_edit_alias}
  • +{/if}
  • {$PALANG.change_password}
  • {$PALANG.pMenu_logout}
  • diff --git a/users/edit-alias.php b/users/edit-alias.php index fe685ca2..3e029f05 100644 --- a/users/edit-alias.php +++ b/users/edit-alias.php @@ -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: */ -?> +?> \ No newline at end of file