projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduced menu.group into translation files.
[timetracker.git]
/
projects.php
diff --git
a/projects.php
b/projects.php
index
d9f3685
..
bf6aed1
100644
(file)
--- a/
projects.php
+++ b/
projects.php
@@
-30,13
+30,18
@@
require_once('initialize.php');
import('form.Form');
import('ttTeamHelper');
import('form.Form');
import('ttTeamHelper');
-// Access check.
-if (!
ttAccessCheck(right_data_entry) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode
)) {
+// Access check
s
.
+if (!
(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects')
)) {
header('Location: access_denied.php');
exit();
}
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->can
ManageTeam(
)) {
+if($user->can
('manage_projects'
)) {
$active_projects = ttTeamHelper::getActiveProjects($user->team_id);
$inactive_projects = ttTeamHelper::getInactiveProjects($user->team_id);
} else
$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('active_projects', $active_projects);
$smarty->assign('inactive_projects', $inactive_projects);
-$smarty->assign('title', $i18n->get
Key
('title.projects'));
+$smarty->assign('title', $i18n->get('title.projects'));
$smarty->assign('content_page_name', 'projects.tpl');
$smarty->display('index.tpl');
$smarty->assign('content_page_name', 'projects.tpl');
$smarty->display('index.tpl');