diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-12-06 17:39:21 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-12-06 17:39:21 -0500 |
commit | f0651c48c14f44a21d01c2ee71ebdd0a5ffd81a6 (patch) | |
tree | 51f1d6b6c2ad14f692e10e2d6bb44bf071a56301 /app/Template/board/task_private.php | |
parent | bd849ff655f9b31f90425c07e5773c7a4e956c34 (diff) |
Restrict actions for project viewers
Diffstat (limited to 'app/Template/board/task_private.php')
-rw-r--r-- | app/Template/board/task_private.php | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index a5d05e49..ad09546e 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -41,15 +41,19 @@ <?php if (! empty($task['owner_id'])): ?> <span class="task-board-user <?= $this->user->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>"> - <?= $this->url->link( - $task['assignee_name'] ?: $task['assignee_username'], - 'board', - 'changeAssignee', - array('task_id' => $task['id'], 'project_id' => $task['project_id']), - false, - 'popover', - t('Change assignee') - ) ?> + <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> + <?= $this->url->link( + $task['assignee_name'] ?: $task['assignee_username'], + 'BoardPopover', + 'changeAssignee', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + false, + 'popover', + t('Change assignee') + ) ?> + <?php else: ?> + <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?> + <?php endif ?> </span> <?php endif ?> |