projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ae00c14
)
Started to replace canManageTeam calls with right checks.
author
Nik Okuntseff
<support@anuko.com>
Tue, 13 Mar 2018 22:30:55 +0000
(22:30 +0000)
committer
Nik Okuntseff
<support@anuko.com>
Tue, 13 Mar 2018 22:30:55 +0000
(22:30 +0000)
WEB-INF/lib/ttExpenseHelper.class.php
patch
|
blob
|
history
WEB-INF/lib/ttFavReportHelper.class.php
patch
|
blob
|
history
WEB-INF/lib/ttUser.class.php
patch
|
blob
|
history
WEB-INF/templates/footer.tpl
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/ttExpenseHelper.class.php
b/WEB-INF/lib/ttExpenseHelper.class.php
index
533c438
..
7d63ba4
100644
(file)
--- a/
WEB-INF/lib/ttExpenseHelper.class.php
+++ b/
WEB-INF/lib/ttExpenseHelper.class.php
@@
-70,7
+70,7
@@
class ttExpenseHelper {
$invoice_id = $fields['invoice_id'];
$paid_part = '';
$invoice_id = $fields['invoice_id'];
$paid_part = '';
- if ($user->can
ManageTeam(
) && $user->isPluginEnabled('ps')) {
+ if ($user->can
('manage_invoices'
) && $user->isPluginEnabled('ps')) {
$paid_part = $fields['paid'] ? ', paid = 1' : ', paid = 0';
}
$paid_part = $fields['paid'] ? ', paid = 1' : ', paid = 0';
}
diff --git
a/WEB-INF/lib/ttFavReportHelper.class.php
b/WEB-INF/lib/ttFavReportHelper.class.php
index
06b745c
..
111e9b1
100644
(file)
--- a/
WEB-INF/lib/ttFavReportHelper.class.php
+++ b/
WEB-INF/lib/ttFavReportHelper.class.php
@@
-171,7
+171,7
@@
class ttFavReportHelper {
// If all users are selected - use a null value (which means "all users").
$all_users_selected = true;
// If all users are selected - use a null value (which means "all users").
$all_users_selected = true;
- if ($user->can
ManageTeam(
)) {
+ if ($user->can
('view_reports'
)) {
$all = ttTeamHelper::getActiveUsers();
foreach ($all as $one) {
if (!in_array($one['id'], $users_in_bean)) {
$all = ttTeamHelper::getActiveUsers();
foreach ($all as $one) {
if (!in_array($one['id'], $users_in_bean)) {
@@
-260,7
+260,7
@@
class ttFavReportHelper {
$bean->setAttribute('users', explode(',', $val['users']));
else {
// Null users value means "all users". Add them to the bean.
$bean->setAttribute('users', explode(',', $val['users']));
else {
// Null users value means "all users". Add them to the bean.
- if ($user->can
ManageTeam(
)) {
+ if ($user->can
('view_reports'
)) {
$all = ttTeamHelper::getActiveUsers();
foreach ($all as $one) {
$all_user_ids[] = $one['id'];
$all = ttTeamHelper::getActiveUsers();
foreach ($all as $one) {
$all_user_ids[] = $one['id'];
diff --git
a/WEB-INF/lib/ttUser.class.php
b/WEB-INF/lib/ttUser.class.php
index
2f7ff95
..
dd42a64
100644
(file)
--- a/
WEB-INF/lib/ttUser.class.php
+++ b/
WEB-INF/lib/ttUser.class.php
@@
-154,7
+154,7
@@
class ttUser {
// isAdmin - determines whether current user is admin (has right_administer_site).
function isAdmin() {
// isAdmin - determines whether current user is admin (has right_administer_site).
function isAdmin() {
- return
(right_administer_site & $this->role
);
+ return
$this->can('administer_site'
);
}
// isManager - determines whether current user is team manager.
}
// isManager - determines whether current user is team manager.
diff --git
a/WEB-INF/templates/footer.tpl
b/WEB-INF/templates/footer.tpl
index
364fc34
..
304b4e2
100644
(file)
--- a/
WEB-INF/templates/footer.tpl
+++ b/
WEB-INF/templates/footer.tpl
@@
-12,7
+12,7
@@
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.43.40
69
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.43.40
70
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>