projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put form.profile.allow_ip into localization files.
[timetracker.git]
/
reports.php
diff --git
a/reports.php
b/reports.php
index
99683c1
..
0028e99
100644
(file)
--- a/
reports.php
+++ b/
reports.php
@@
-37,7
+37,7
@@
import('ttFavReportHelper');
import('ttClientHelper');
// Access check.
import('ttClientHelper');
// Access check.
-if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports'))) {
+if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports')
|| ttAccessAllowed('view_all_reports')
)) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
@@
-141,13
+141,15
@@
if ($user->canManageTeam() && $user->isPluginEnabled('ps')) {
}
$user_list = array();
}
$user_list = array();
-if ($user->can('view_reports') || $user->isClient()) {
+if ($user->can('view_reports') || $user->
can('view_all_reports') || $user->
isClient()) {
// Prepare user and assigned projects arrays.
// Prepare user and assigned projects arrays.
- if ($user->can('view_reports')) {
+ if ($user->can('view_reports') || $user->can('view_all_reports')) {
+ $max_rank = $user->rank-1;
+ if ($user->can('view_all_reports')) $max_rank = 512;
if ($user->can('view_own_reports'))
if ($user->can('view_own_reports'))
- $options = array('max_rank'=>$
user->rank-1
,'include_self'=>true);
+ $options = array('max_rank'=>$
max_rank
,'include_self'=>true);
else
else
- $options = array('max_rank'=>$
user->rank-1
);
+ $options = array('max_rank'=>$
max_rank
);
$users = $user->getUsers($options); // Active and inactive users.
}
elseif ($user->isClient())
$users = $user->getUsers($options); // Active and inactive users.
}
elseif ($user->isClient())