JReviews logo Docs
Menu
Version

jreviews:permission:comment.update

Filters whether a user has permission to update a comment (user or editorial).

Filter
Comment Permissions
Since 6.0.0

You need to have a working knowledge of Hooks before you get started.

Fires when checking comment update permission, after checking comment type-specific permissions @hook jreviews:permission:comment.update_user_comment

Parameters

Name Type Description
$canUpdate bool Whether the user can update the editorial comment
$user \JReviews\App\Models\User The user attempting to update the comment
$comment \JReviews\App\Models\Comment The editorial comment being updated

Boilerplate Code

Use the boilerplate code to start using the filter, and add your own logic to modify the first argument and return it.

fwd_add_filter('jreviews:permission:comment.update', function($canUpdate, $user, $comment)
{
    // Your code here
    
    return $canUpdate;
});
Development & Support
Customizations are not included with support. We provide this information to make it easier for developers to extend the functionality. From time to time we may have some availability for custom work. Get in touch to see if there's an opportunity to work together.

Source Files

  • app/Policies/CommentPolicy.php