Soem refactoring to keep things a bit more consistent.
[timetracker.git] / projects.php
index 8f1ce5c..d9f3685 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_data_entry)) {
+if (!ttAccessCheck(right_data_entry) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
@@ -47,4 +47,3 @@ $smarty->assign('inactive_projects', $inactive_projects);
 $smarty->assign('title', $i18n->getKey('title.projects'));
 $smarty->assign('content_page_name', 'projects.tpl');
 $smarty->display('index.tpl');
-?>
\ No newline at end of file