From 0d316f7f0fd0d831ade6177db692577eb6e78b43 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 20 Jul 2018 10:56:41 +0930 Subject: [PATCH] Make "own" permissions depend on the user's ability to reply See https://github.com/flarum/core/pull/1513 --- extensions/tags/src/Access/DiscussionPolicy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/tags/src/Access/DiscussionPolicy.php b/extensions/tags/src/Access/DiscussionPolicy.php index eb420ed2c..2db98e7cb 100755 --- a/extensions/tags/src/Access/DiscussionPolicy.php +++ b/extensions/tags/src/Access/DiscussionPolicy.php @@ -120,7 +120,7 @@ class DiscussionPolicy extends AbstractPolicy */ public function tag(User $actor, Discussion $discussion) { - if ($discussion->user_id == $actor->id) { + if ($discussion->user_id == $actor->id && $actor->can('reply', $discussion)) { $allowEditTags = $this->settings->get('allow_tag_change'); if ($allowEditTags === '-1'