From 7916f561fed6b50348f144fc411ca82ee9bd5ebb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 16 Mar 2018 21:54:12 +0000 Subject: [PATCH] Fixed users page for revamped roles. --- WEB-INF/lib/ttUser.class.php | 2 -- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/users.tpl | 4 ++-- WEB-INF/templates/users.tpl | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 0d62749b..621ab05f 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -97,8 +97,6 @@ class ttUser { $this->rights = explode(',', $val['rights']); $this->is_client = !in_array('track_own_time', $this->rights); $this->rank = $val['rank']; - // Downgrade rank to legacy ROLE_MANAGER rank, until we have sub-groups implemented. - if ($this->rank > ROLE_MANAGER) $this->rank = ROLE_MANAGER; $this->client_id = $val['client_id']; $this->email = $val['email']; $this->lang = $val['lang']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fd8324df..4c2b3415 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {if $u.rank <= $user->rank} + {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)} {if $u.id != $user->id}{else}{/if} {else} @@ -63,9 +63,9 @@ - {if $u.rank <= $user->rank} + {if $u.rank < $user->rank} - {if $u.id != $user->id}{else}{/if} + {else} -- 2.20.1
 Anuko Time Tracker 1.17.49.4088 | Copyright © Anuko | +  Anuko Time Tracker 1.17.49.4089 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl index f3dbe850..e2b815f1 100644 --- a/WEB-INF/templates/mobile/users.tpl +++ b/WEB-INF/templates/mobile/users.tpl @@ -22,7 +22,7 @@ {if $user->uncompleted_indicators} {/if} - {if $u.rank <= $user->rank} + {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)} {$u.name|escape} {else} {$u.name|escape} @@ -54,7 +54,7 @@ {foreach $inactive_users as $u}
- {if $u.rank <= $user->rank} + {if $u.rank < $user->rank} {$u.name|escape} {else} {$u.name|escape} diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl index 85d6efc8..f4743532 100644 --- a/WEB-INF/templates/users.tpl +++ b/WEB-INF/templates/users.tpl @@ -28,7 +28,7 @@ {$u.login|escape} {$u.role_name|escape}{$i18n.label.edit}{$i18n.label.delete}{$u.name|escape} {$u.login|escape} {$u.role_name|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.delete}