1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

permissions logic for janitors

This commit is contained in:
Michael Save 2012-01-07 11:42:10 +11:00
parent 1311bc977c
commit 3a16a570dd

View File

@ -147,6 +147,8 @@
}
if(hasPermission($config['mod']['manageusers'])) {
$fieldset['Administration'] .= '<li><a href="?/users">' . _('Manage users') . '</a></li>';
} elseif(hasPermission($config['mod']['change_password'])) {
$fieldset['Administration'] .= '<li><a href="?/users/' . $user['id'] . '">' . _('Change own password') . '</a></li>';
}
if(hasPermission($config['mod']['modlog'])) {
$fieldset['Administration'] .= '<li><a href="?/log">' . _('Moderation log') . '</a></li>';
@ -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;
}