Avoid people to remove themselves from project permissions

This commit is contained in:
Frédéric Guillot
2018-05-02 14:17:29 -07:00
parent b9a457fc03
commit fa90a29490

View File

@@ -21,7 +21,9 @@
)) ?> )) ?>
</td> </td>
<td> <td>
<?= $this->url->icon('trash-o', t('Remove'), 'ProjectPermissionController', 'removeUser', array('project_id' => $project['id'], 'user_id' => $user['id']), true) ?> <?php if (! $this->user->isCurrentUser($user['id'])): ?>
<?= $this->url->icon('trash-o', t('Remove'), 'ProjectPermissionController', 'removeUser', array('project_id' => $project['id'], 'user_id' => $user['id']), true) ?>
<?php endif ?>
</td> </td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>