mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 05:32:49 +08:00
Merge pull request #57 from flarum/tz/1419-restrict-own-permissions
Make "own" permissions depend on the user's ability to reply
This commit is contained in:
commit
b0a2482c87
|
@ -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