summaryrefslogtreecommitdiff
path: root/app/Template/user/index.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
commite9fedf3e5cd63aea4da7a71f6647ee427c62fa49 (patch)
treeabc2de5aebace4a2d7c94805552264dab6b10bc7 /app/Template/user/index.php
parent346b8312e5ac877ce3192c2db3a26b500018bbb5 (diff)
Rewrite of the authentication and authorization system
Diffstat (limited to 'app/Template/user/index.php')
-rw-r--r--app/Template/user/index.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/Template/user/index.php b/app/Template/user/index.php
index 7c6ecc1e..cb7416d6 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user/index.php
@@ -1,6 +1,6 @@
<section id="main">
<div class="page-header">
- <?php if ($this->user->isAdmin()): ?>
+ <?php if ($this->user->hasAccess('user', 'create')): ?>
<ul>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li>
@@ -18,8 +18,7 @@
<th><?= $paginator->order(t('Username'), 'username') ?></th>
<th><?= $paginator->order(t('Name'), 'name') ?></th>
<th><?= $paginator->order(t('Email'), 'email') ?></th>
- <th><?= $paginator->order(t('Administrator'), 'is_admin') ?></th>
- <th><?= $paginator->order(t('Project Administrator'), 'is_project_admin') ?></th>
+ <th><?= $paginator->order(t('Role'), 'role') ?></th>
<th><?= $paginator->order(t('Two factor authentication'), 'twofactor_activated') ?></th>
<th><?= $paginator->order(t('Notifications'), 'notifications_enabled') ?></th>
<th><?= $paginator->order(t('Account type'), 'is_ldap_user') ?></th>
@@ -39,10 +38,7 @@
<a href="mailto:<?= $this->e($user['email']) ?>"><?= $this->e($user['email']) ?></a>
</td>
<td>
- <?= $user['is_admin'] ? t('Yes') : t('No') ?>
- </td>
- <td>
- <?= $user['is_project_admin'] ? t('Yes') : t('No') ?>
+ <?= $this->user->getRoleName($user['role']) ?>
</td>
<td>
<?= $user['twofactor_activated'] ? t('Yes') : t('No') ?>