mirror of
https://github.com/flarum/core.git
synced 2025-10-21 19:56:29 +02:00
Remove use of event priorities
Event priorities are no longer in Laravel - see dbbfc62bef
Updated the AbstractPolicy terminology to reflect the new behaviour,
which is that there is no guarantee that the catch-all methods will run
after all specific methods have run globally. This behaviour is only
guaranteed within the policy.
This commit is contained in:
@@ -60,7 +60,7 @@ class PostPolicy extends AbstractPolicy
|
||||
* @param \Flarum\Post\Post $post
|
||||
* @return bool|null
|
||||
*/
|
||||
public function after(User $actor, $ability, Post $post)
|
||||
public function can(User $actor, $ability, Post $post)
|
||||
{
|
||||
if ($actor->can($ability.'Posts', $post->discussion)) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user