mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 21:11:55 +08:00
Make "own" permissions depend on the user's ability to reply
See https://github.com/flarum/core/pull/1513
This commit is contained in:
parent
a58c8cd998
commit
0d316f7f0f
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue
Block a user