Acl refactoring
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<?php if ($this->acl->isAdminUser()): ?>
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New project'), 'project', 'create') ?></li>
|
||||
<?php endif ?>
|
||||
<li><i class="fa fa-lock fa-fw"></i><?= $this->a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
|
||||
<li><i class="fa fa-folder fa-fw"></i><?= $this->a(t('Project management'), 'project', 'index') ?></li>
|
||||
<?php if ($this->acl->isAdminUser()): ?>
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->a(t('User management'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-cog fa-fw"></i><?= $this->a(t('Settings'), 'config', 'index') ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($this->projectPermission->adminAllowed($project['id'], $this->acl->getUserId())): ?>
|
||||
<?php if ($this->projectPermission->isManager($project['id'], $this->userSession->getId())): ?>
|
||||
<?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>
|
||||
<?php endif ?>
|
||||
<?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
|
||||
|
||||
Reference in New Issue
Block a user