From 656b0b0897810f1f0416402f06095164012fd836 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Fri, 29 Jul 2011 19:42:46 +0000 Subject: [PATCH] index.tpl: - use $authentication_has_role instead of checking if $smarty_template contains "users_". This makes the code cleaner and avoids problems when merging templates to names without "users_". - check for login template without using needle - that's possible after merging the login and users_login template to login.tpl git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1139 a1433add-5e2c-0410-b055-b7f2511e0802 --- templates/index.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/index.tpl b/templates/index.tpl index 7696338c..bc6a73fb 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,9 +1,9 @@ {strip} {include file="header.tpl"} -{if $smarty_template|needle:"login" neq 1} +{if $smarty_template != 'login'} {config_load file="menu.conf" section=$smarty_template} - {if $smarty_template|needle:"users_" eq 1} + {if $authentication_has_role.user} {include file='users_menu.tpl'} {else} {include file='menu.tpl'}