Prevents users to convert subtaks to tasks when custom role does not allow it

Fixes #5069
This commit is contained in:
Frédéric Guillot
2023-04-04 19:30:05 -07:00
committed by Frédéric Guillot
parent 4c40fe1931
commit 022b106d2d
2 changed files with 8 additions and 0 deletions

View File

@@ -7,8 +7,10 @@
<li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
</li>
<?php if ($this->projectRole->canCreateTaskInColumn($task['project_id'], $task['column_id'])): ?>
<li>
<?= $this->modal->confirm('clone', t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
</li>
<?php endif ?>
</ul>
</div>