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
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@
)) ?>
</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>
</tr>
<?php endforeach ?>