mirror of
https://github.com/flarum/core.git
synced 2025-07-21 16:51:34 +02:00
Clean up
This commit is contained in:
@@ -61,13 +61,9 @@ abstract class Model extends Eloquent
|
||||
*/
|
||||
public function can(User $actor, $action)
|
||||
{
|
||||
$can = static::$dispatcher->until(new ModelAllow($this, $actor, $action));
|
||||
$allowed = static::$dispatcher->until(new ModelAllow($this, $actor, $action));
|
||||
|
||||
if ($can !== null) {
|
||||
return $can;
|
||||
}
|
||||
|
||||
return false;
|
||||
return $allowed ?: false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user