mylists:permission:list.update
Filters whether a user has permission to update/edit a MyList (user list or site list).
You need to have a working knowledge of Hooks before you get started.
Fires when checking if user can edit a list's details (title, description, etc.)
Parameters
| Name | Type | Description |
|---|---|---|
$canUpdate |
bool |
Whether the user can update the list |
$user |
\JReviews\App\Models\User |
The user attempting to update |
$list |
\JReviews\Addons\MyLists\App\Models\MyList |
The list 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('mylists:permission:list.update', function($canUpdate, $user, $list)
{
// Your code here
return $canUpdate;
});
Source Files
app/Policies/ListPolicy.php