Fix permissions being incorrectly granted

This commit is contained in:
Toby Zerner 2015-11-01 09:38:25 +10:30
parent 17619843b5
commit 90def3f0db

View File

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