summaryrefslogtreecommitdiff
path: root/app/Template/comment/show.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-12-31 12:37:15 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-12-31 12:37:15 -0500
commit772804add8095eea9b3ec2a832c2f82fbb9a6fd5 (patch)
tree782a414d15f9091d04bcf3960a957f952958e548 /app/Template/comment/show.php
parent66f150d887a34d2b51ff14f22d0fd41a34f8cc77 (diff)
Acl refactoring
Diffstat (limited to 'app/Template/comment/show.php')
-rw-r--r--app/Template/comment/show.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
index 2631975a..2cf9708b 100644
--- a/app/Template/comment/show.php
+++ b/app/Template/comment/show.php
@@ -9,12 +9,12 @@
<?php if (! isset($preview)): ?>
<ul class="comment-actions">
<li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
- <?php if ((! isset($not_editable) || ! $not_editable) && ($this->acl->isAdminUser() || $this->acl->isCurrentUser($comment['user_id']))): ?>
+ <?php if ((! isset($not_editable) || ! $not_editable) && ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($comment['user_id']))): ?>
<li>
- <?= $this->a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
</li>
<li>
- <?= $this->a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
</li>
<?php endif ?>
</ul>
@@ -33,7 +33,16 @@
)
) ?>
<?php else: ?>
- <?= $this->markdown($comment['comment']) ?>
+ <?= $this->markdown(
+ $comment['comment'],
+ array(
+ 'controller' => 'task',
+ 'action' => 'show',
+ 'params' => array(
+ 'project_id' => $project['id']
+ )
+ )
+ ) ?>
<?php endif ?>
</div>