summaryrefslogtreecommitdiff
path: root/app/Template/task/dropdown.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-04-08 10:34:34 -0400
committerFrederic Guillot <fred@kanboard.net>2017-04-08 10:34:34 -0400
commit9a8c6d6493191a09720a634c58c230dba1cafeeb (patch)
tree44e75a5dafefa502290a8b89fa91ff91d83b0c0f /app/Template/task/dropdown.php
parent003c03a4e6a73dfa3633ba756e3647bf9d4517a5 (diff)
Improve task update restriction
Diffstat (limited to 'app/Template/task/dropdown.php')
-rw-r--r--app/Template/task/dropdown.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php
index f35abc79..5135fb77 100644
--- a/app/Template/task/dropdown.php
+++ b/app/Template/task/dropdown.php
@@ -1,15 +1,17 @@
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong>#<?= $task['id'] ?> <i class="fa fa-caret-down"></i></strong></a>
<ul>
- <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>
- <li>
- <?= $this->url->icon('play', t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
+ <?php if ($this->projectRole->canUpdateTask($task)): ?>
+ <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>
+ <li>
+ <?= $this->url->icon('play', t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
<?php endif ?>
<li>
- <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li>
<?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li>