summaryrefslogtreecommitdiff
path: root/app/Template/project_permission/users.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-05-02 14:17:29 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-05-02 14:17:29 -0700
commitfa90a294906454a15d17cc1c374eeda73640c350 (patch)
tree3580023c99cfe95ea31633c051edba49bd07cd3d /app/Template/project_permission/users.php
parentb9a457fc031bc048da74961d91999ac9bb2c6946 (diff)
Avoid people to remove themselves from project permissions
Diffstat (limited to 'app/Template/project_permission/users.php')
-rw-r--r--app/Template/project_permission/users.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Template/project_permission/users.php b/app/Template/project_permission/users.php
index 1180fe1c..54c85574 100644
--- a/app/Template/project_permission/users.php
+++ b/app/Template/project_permission/users.php
@@ -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 ?>