Started to work on ttRegistrator class to encapsulate restration related tasks.
[timetracker.git] / users.php
index da57040..28a3722 100644 (file)
--- a/users.php
+++ b/users.php
@@ -30,9 +30,10 @@ require_once('initialize.php');
 import('form.Form');
 import('ttTeamHelper');
 import('ttTimeHelper');
+import('ttRoleHelper');
 
 // Access check.
-if (!ttAccessCheck(right_data_entry)) {
+if (!ttAccessAllowed('view_users')) {
   header('Location: access_denied.php');
   exit();
 }
@@ -45,7 +46,7 @@ if($user->canManageTeam()) {
 }
 
 // Check if the team is set to show indicators for uncompleted time entries.
-if (UNCOMPLETED_INDICATORS == $user->uncompleted_indicators) {
+if ($user->uncompleted_indicators) {
   // Check each active user if they have an uncompleted time entry.
   foreach ($active_users as $key => $user) {
     $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']);