1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 18:51:40 +02:00
This commit is contained in:
Toby Zerner
2015-07-28 15:35:03 +09:30
parent b87cd3ed53
commit 02944548a1

View File

@@ -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;
}
/**