projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed entity_type datatype in db to optimize things.
[timetracker.git]
/
projects.php
diff --git
a/projects.php
b/projects.php
index
ce7bb9a
..
1b13789
100644
(file)
--- a/
projects.php
+++ b/
projects.php
@@
-27,23
+27,30
@@
// +----------------------------------------------------------------------+
require_once('initialize.php');
// +----------------------------------------------------------------------+
require_once('initialize.php');
-import('form.Form');
-import('ttTeamHelper');
+import('ttGroupHelper');
-// Access check.
-if (!
ttAccessAllowed('track_own_time') || (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->getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) {
+ header('Location: feature_disabled.php');
+ exit();
+}
+// End of access checks.
+
+$showFiles = $user->isPluginEnabled('at');
-if($user->can
ManageTeam(
)) {
- $active_projects = tt
TeamHelper::getActiveProjects($user->team_id
);
- $inactive_projects = tt
TeamHelper::getInactiveProjects($user->team_id
);
+if($user->can
('manage_projects'
)) {
+ $active_projects = tt
GroupHelper::getActiveProjects($showFiles
);
+ $inactive_projects = tt
GroupHelper::getInactiveProjects($showFiles
);
} else
} else
- $active_projects = $user->getAssignedProjects();
+ $active_projects = $user->getAssignedProjects(
$showFiles
);
$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->getKey('title.projects'));
+$smarty->assign('show_files', $showFiles);
+$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');