Make "own" permissions depend on the user's ability to reply

See https://github.com/flarum/core/pull/1513
This commit is contained in:
Toby Zerner 2018-07-20 10:56:41 +09:30
parent a58c8cd998
commit 0d316f7f0f

View File

@ -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'