X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Fprojects.php;h=a9f8ab02df38497e64ac93d3a5c2ddebd32f8068;hb=216d1c29ae204a1404a5d38cad77abce516e2386;hp=33d1d51b5d04830f1ce3d272f35736768e2c0d82;hpb=ee49ee74b2a7d3c6daaa2d4bc6397b0c89e3099b;p=timetracker.git diff --git a/mobile/projects.php b/mobile/projects.php index 33d1d51b..a9f8ab02 100644 --- a/mobile/projects.php +++ b/mobile/projects.php @@ -30,13 +30,18 @@ require_once('../initialize.php'); import('form.Form'); import('ttTeamHelper'); -// Access check. -if (!ttAccessCheck(right_data_entry)) { +// Access checks. +if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) { 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(); +} +// End of access checks. -if($user->canManageTeam()) { +if($user->can('manage_projects')) { $active_projects = ttTeamHelper::getActiveProjects($user->team_id); $inactive_projects = ttTeamHelper::getInactiveProjects($user->team_id); } else @@ -44,6 +49,6 @@ if($user->canManageTeam()) { $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', 'mobile/projects.tpl'); $smarty->display('mobile/index.tpl');