Fixed a problem with predefined expenses missing on mobile pages.
[timetracker.git] / task_add.php
index 15e8e7f..5ef549b 100644 (file)
@@ -33,7 +33,7 @@ import('ttTeamHelper');
 import('ttTaskHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
   header('Location: access_denied.php');
   exit();
 }
@@ -75,7 +75,7 @@ if ($request->isPost()) {
     } else
       $err->add($i18n->getKey('error.task_exists'));
   }
-} // POST
+} // isPost
 
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('onload', 'onLoad="document.taskForm.name.focus()"');