Fixed a problem with predefined expenses missing on mobile pages.
[timetracker.git] / project_edit.php
index 7f2cd34..11abccc 100644 (file)
@@ -32,7 +32,7 @@ import('ttProjectHelper');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
@@ -124,7 +124,7 @@ if ($request->isPost()) {
         $err->add($i18n->getKey('error.project_exists'));
     }
   }
-} // POST
+} // isPost
 
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('onload', 'onLoad="document.projectForm.name.focus()"');