From 3a16a570dd4d6cb697653f0e48a2a890bbadc181 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sat, 7 Jan 2012 11:42:10 +1100 Subject: [PATCH] permissions logic for janitors --- mod.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod.php b/mod.php index 56f90a79..71053d23 100644 --- a/mod.php +++ b/mod.php @@ -147,6 +147,8 @@ } if(hasPermission($config['mod']['manageusers'])) { $fieldset['Administration'] .= '
  • ' . _('Manage users') . '
  • '; + } elseif(hasPermission($config['mod']['change_password'])) { + $fieldset['Administration'] .= '
  • ' . _('Change own password') . '
  • '; } if(hasPermission($config['mod']['modlog'])) { $fieldset['Administration'] .= '
  • ' . _('Moderation log') . '
  • '; @@ -1243,7 +1245,10 @@ setCookies(); } - header('Location: ?/users', true, $config['redirect_http']); + if(hasPermission($config['mod']['manageusers'])) + header('Location: ?/users', true, $config['redirect_http']); + else + header('Location: ?/', true, $config['redirect_http']); exit; }