Fixed users page for revamped roles.
authorNik Okuntseff <support@anuko.com>
Fri, 16 Mar 2018 21:54:12 +0000 (21:54 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 16 Mar 2018 21:54:12 +0000 (21:54 +0000)
WEB-INF/lib/ttUser.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/mobile/users.tpl
WEB-INF/templates/users.tpl

index 0d62749..621ab05 100644 (file)
@@ -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'];
index fd8324d..4c2b341 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.49.4088 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.49.4089 | Copyright &copy; <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>
index f3dbe85..e2b815f 100644 (file)
@@ -22,7 +22,7 @@
             {if $user->uncompleted_indicators}
               <span class="uncompleted-entry{if $u.has_uncompleted_entry} active{/if}"{if $u.has_uncompleted_entry} title="{$i18n.form.users.uncompleted_entry}"{/if}></span>
             {/if}
-            {if $u.rank <= $user->rank}
+            {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
@@ -54,7 +54,7 @@
     {foreach $inactive_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
           <td>
-            {if $u.rank <= $user->rank}
+            {if $u.rank < $user->rank}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
index 85d6efc..f474353 100644 (file)
@@ -28,7 +28,7 @@
           </td>
           <td>{$u.login|escape}</td>
           <td>{$u.role_name|escape}</td>
-      {if $u.rank <= $user->rank}
+      {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
           <td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
          {if $u.id != $user->id}<td><a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a></td>{else}<td></td>{/if}
       {else}
@@ -63,9 +63,9 @@
           <td>{$u.name|escape}</td>
           <td>{$u.login|escape}</td>
           <td>{$u.role_name|escape}</td>
-      {if $u.rank <= $user->rank}
+      {if $u.rank < $user->rank}
           <td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
-         {if $u.id != $user->id}<td><a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a></td>{else}<td></td>{/if}
+          <td><a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a></td>
       {else}
           <td></td>
           <td></td>