import('form.Form');
import('ttTeamHelper');
-// Access check.
-if (!ttAccessCheck(right_data_entry)) {
+// Access checks.
+if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) {
header('Location: access_denied.php');
exit();
}
+if (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
+ header('Location: feature_disabled.php');
+ exit();
+}
if($user->canManageTeam()) {
$active_projects = ttTeamHelper::getActiveProjects($user->team_id);
$smarty->assign('active_projects', $active_projects);
$smarty->assign('inactive_projects', $inactive_projects);
-$smarty->assign('title', $i18n->getKey('title.projects'));
+$smarty->assign('title', $i18n->get('title.projects'));
$smarty->assign('content_page_name', 'projects.tpl');
$smarty->display('index.tpl');