From 90def3f0db033244c1aa455727b9c1eb50694933 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 1 Nov 2015 09:38:25 +1030 Subject: [PATCH] Fix permissions being incorrectly granted --- src/Core/CoreServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/CoreServiceProvider.php b/src/Core/CoreServiceProvider.php index 127bd99b1..0759a0044 100644 --- a/src/Core/CoreServiceProvider.php +++ b/src/Core/CoreServiceProvider.php @@ -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; }