mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Fix permissions being incorrectly granted
This commit is contained in:
parent
17619843b5
commit
90def3f0db
|
@ -69,7 +69,7 @@ class CoreServiceProvider extends AbstractServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->make('flarum.gate')->before(function (User $actor, $ability, $model = null) {
|
$this->app->make('flarum.gate')->before(function (User $actor, $ability, $model = null) {
|
||||||
if ($actor->hasPermission($ability)) {
|
if (! $model && $actor->hasPermission($ability)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user