mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 08:22:41 +08:00
Clean up
This commit is contained in:
parent
44767cb329
commit
864df225c2
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user