Hide edit button when user cannot edit task
Check for custom roles to show edit button Fixes #4123
This commit is contained in:
parent
f79a2ee5e7
commit
f3b944c77f
|
|
@ -19,7 +19,9 @@
|
|||
<div class="task-board-saving-icon" style="display: none;"><i class="fa fa-spinner fa-pulse"></i></div>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
|
@ -37,7 +39,9 @@
|
|||
<div class="task-board-header">
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue