From 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 31 Dec 2014 12:37:15 -0500 Subject: Acl refactoring --- app/Template/project/sidebar.php | 48 +++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'app/Template/project/sidebar.php') 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 @@ a(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?> - acl->isAdminUser() || $project['is_private']): ?> + acl->isManagerActionAllowed($project['id'])): ?>
  • a(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?>
  • @@ -15,27 +15,23 @@
  • a(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?>
  • +
  • + a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> +
  • +
  • + a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> +
  • +
  • + a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> +
  • + +
  • + a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> +
  • - acl->isAdminUser() || $is_owner || $project['is_private']): ?> -
  • - a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> -
  • -
  • - a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> -
  • -
  • - a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> -
  • - -
  • - a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> -
  • - -
  • - a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> -
  • - - acl->isAdminUser() || $project['is_private']): ?> +
  • + a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> +
  • a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id']), true) ?>
  • @@ -46,13 +42,15 @@ a(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> -
  • - a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> -
  • + userSession->isAdmin()): ?> +
  • + a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> +
  • + - acl->isAdminUser() || $project['is_private']): ?> + acl->isManagerActionAllowed($project['id'])): ?>