diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
commit | 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 (patch) | |
tree | 782a414d15f9091d04bcf3960a957f952958e548 /app/Template/project/sidebar.php | |
parent | 66f150d887a34d2b51ff14f22d0fd41a34f8cc77 (diff) |
Acl refactoring
Diffstat (limited to 'app/Template/project/sidebar.php')
-rw-r--r-- | app/Template/project/sidebar.php | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 52a971d6..f5d0e352 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -5,7 +5,7 @@ <?= $this->a(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?> </li> - <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> + <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?> <li> <?= $this->a(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?> </li> @@ -15,27 +15,23 @@ <li> <?= $this->a(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> </li> + <li> + <?= $this->a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> + </li> + <?php if ($project['is_private'] == 0): ?> + <li> + <?= $this->a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> + </li> <?php endif ?> - <?php if ($this->acl->isAdminUser() || $is_owner || $project['is_private']): ?> - <li> - <?= $this->a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> - </li> - <?php if ($project['is_private'] == 0): ?> - <li> - <?= $this->a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> - </li> - <?php endif ?> - <li> - <?= $this->a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> - </li> - <?php endif ?> - <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> + <li> + <?= $this->a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> + </li> <li> <?= $this->a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id']), true) ?> </li> @@ -46,13 +42,15 @@ <?= $this->a(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> <?php endif ?> </li> - <li> - <?= $this->a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> - </li> + <?php if ($this->userSession->isAdmin()): ?> + <li> + <?= $this->a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> + </li> + <?php endif ?> <?php endif ?> </ul> - <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> + <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?> <h2><?= t('Exports') ?></h2> <ul> <li> |