Ongoing process of renaming team to group.
[timetracker.git] / tasks.php
index 6258831..2d310d0 100644 (file)
--- a/tasks.php
+++ b/tasks.php
@@ -30,15 +30,19 @@ require_once('initialize.php');
 import('form.Form');
 import('ttTeamHelper');
 
-// Access check.
-if (!ttAccessCheck(right_manage_team)) {
+// Access checks.
+if (!ttAccessAllowed('manage_tasks')) {
   header('Location: access_denied.php');
   exit();
 }
+if (MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
+  header('Location: feature_disabled.php');
+  exit();
+}
+// End of access checks.
 
 $smarty->assign('active_tasks', ttTeamHelper::getActiveTasks($user->team_id));
 $smarty->assign('inactive_tasks', ttTeamHelper::getInactiveTasks($user->team_id));
-$smarty->assign('title', $i18n->getKey('title.tasks'));
+$smarty->assign('title', $i18n->get('title.tasks'));
 $smarty->assign('content_page_name', 'tasks.tpl');
 $smarty->display('index.tpl');
-?>
\ No newline at end of file