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