mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 06:37:11 +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