projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reorganized code a bit for clarity.
[timetracker.git]
/
WEB-INF
/
lib
/
ttUser.class.php
diff --git
a/WEB-INF/lib/ttUser.class.php
b/WEB-INF/lib/ttUser.class.php
index
2f71ad3
..
959649e
100644
(file)
--- a/
WEB-INF/lib/ttUser.class.php
+++ b/
WEB-INF/lib/ttUser.class.php
@@
-107,13
+107,13
@@
class ttUser {
// Set user rights.
if ($this->role == ROLE_USER) {
$this->rights = right_data_entry|right_view_charts|right_view_reports;
// Set user rights.
if ($this->role == ROLE_USER) {
$this->rights = right_data_entry|right_view_charts|right_view_reports;
- } else
if ($this->role == ROLE_CLIENT) {
+ } elseif ($this->role == ROLE_CLIENT) {
$this->rights = right_view_reports|right_view_invoices; // TODO: how about right_view_charts, too?
$this->rights = right_view_reports|right_view_invoices; // TODO: how about right_view_charts, too?
- } else
if ($this->role == ROLE_COMANAGER) {
+ } elseif ($this->role == ROLE_COMANAGER) {
$this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team;
$this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team;
- } else
if ($this->role == ROLE_MANAGER) {
+ } elseif ($this->role == ROLE_MANAGER) {
$this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team|right_assign_roles|right_export_team;
$this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team|right_assign_roles|right_export_team;
- } else
if ($this->role == ROLE_SITE_ADMIN) {
+ } elseif ($this->role == ROLE_SITE_ADMIN) {
$this->rights = right_administer_site;
}
}
$this->rights = right_administer_site;
}
}
@@
-168,4
+168,3
@@
class ttUser {
return $result;
}
}
return $result;
}
}
-?>
\ No newline at end of file