Refactor header to use user rights. (#57)
[timetracker.git] / users.php
index 28a3722..35fd416 100644 (file)
--- a/users.php
+++ b/users.php
@@ -33,7 +33,7 @@ import('ttTimeHelper');
 import('ttRoleHelper');
 
 // Access check.
-if (!ttAccessAllowed('view_users')) {
+if (!(ttAccessAllowed('view_users') || ttAccessAllowed('manage_users'))) {
   header('Location: access_denied.php');
   exit();
 }
@@ -56,6 +56,6 @@ if ($user->uncompleted_indicators) {
 $smarty->assign('active_users', $active_users);
 $smarty->assign('inactive_users', $inactive_users);
 $smarty->assign('can_delete_manager', $can_delete_manager);
-$smarty->assign('title', $i18n->getKey('title.users'));
+$smarty->assign('title', $i18n->get('title.users'));
 $smarty->assign('content_page_name', 'users.tpl');
 $smarty->display('index.tpl');