From 3c87f800ddaa048d2c19ca296c8f1da9ffb3fbfa Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Wed, 27 May 2020 12:22:08 -0400 Subject: [PATCH] Instances of models should not matter when checking permissions (#2186) --- src/User/UserServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/User/UserServiceProvider.php b/src/User/UserServiceProvider.php index 881f15b79..1af46f60a 100644 --- a/src/User/UserServiceProvider.php +++ b/src/User/UserServiceProvider.php @@ -103,7 +103,7 @@ class UserServiceProvider extends AbstractServiceProvider // If no policy covered this permission query, we will only grant // the permission if the actor's groups have it. Otherwise, we will // not allow the user to perform this action. - if ($actor->isAdmin() || (! $model && $actor->hasPermission($ability))) { + if ($actor->isAdmin() || $actor->hasPermission($ability)) { return true; }