mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 05:18:14 +08:00
Clean up
This commit is contained in:
parent
b87cd3ed53
commit
02944548a1
|
@ -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…
Reference in New Issue
Block a user