summaryrefslogtreecommitdiff
path: root/app/Template/board/table_column.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-18 22:05:20 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-18 22:05:20 -0400
commitc328bcf840f2fe21e87246b10fb8c75dfa640d1d (patch)
tree0c9d07b3a8f2f08bd127aa717611126487090f1c /app/Template/board/table_column.php
parent3043163747b13ce1942b2e55977cf7c5417021de (diff)
Enforce restrictions for column menus
Diffstat (limited to 'app/Template/board/table_column.php')
-rw-r--r--app/Template/board/table_column.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php
index 3daa8aed..e2976f27 100644
--- a/app/Template/board/table_column.php
+++ b/app/Template/board/table_column.php
@@ -35,18 +35,20 @@
<i class="fa fa-minus-square fa-fw"></i>
<a href="#" class="board-toggle-column-view" data-column-id="<?= $column['id'] ?>"><?= t('Hide this column') ?></a>
</li>
- <?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $column['project_id'])): ?>
+ <?php if ($this->projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?>
<li>
<i class="fa fa-align-justify fa-fw" aria-hidden="true"></i>
<?= $this->url->link(t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
</li>
- <?php if ($column['nb_tasks'] > 0): ?>
- <li>
- <i class="fa fa-close fa-fw"></i>
- <?= $this->url->link(t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
- </li>
- <?php endif ?>
<?php endif ?>
+
+ <?php if ($column['nb_tasks'] > 0 && $this->projectRole->canChangeTaskStatusInColumn($column['project_id'], $column['id'])): ?>
+ <li>
+ <i class="fa fa-close fa-fw"></i>
+ <?= $this->url->link(t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+
<?= $this->hook->render('template:board:column:dropdown', array('swimlane' => $swimlane, 'column' => $column)) ?>
</ul>
</span>