mirror of
https://github.com/flarum/core.git
synced 2025-08-19 14:51:47 +02: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:
@@ -120,7 +120,7 @@ class DiscussionPolicy extends AbstractPolicy
|
|||||||
*/
|
*/
|
||||||
public function tag(User $actor, Discussion $discussion)
|
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');
|
$allowEditTags = $this->settings->get('allow_tag_change');
|
||||||
|
|
||||||
if ($allowEditTags === '-1'
|
if ($allowEditTags === '-1'
|
||||||
|
Reference in New Issue
Block a user