diff --git a/framework/core/src/User/UserPolicy.php b/framework/core/src/User/UserPolicy.php index d9b26f9b0..4ccf128da 100644 --- a/framework/core/src/User/UserPolicy.php +++ b/framework/core/src/User/UserPolicy.php @@ -36,7 +36,7 @@ class UserPolicy extends AbstractPolicy */ public function find(User $actor, Builder $query) { - if ($actor->cannot('viewUserList')) { + if ($actor->cannot('viewDiscussions')) { if ($actor->isGuest()) { $query->whereRaw('FALSE'); } else { diff --git a/framework/core/tests/integration/api/users/UpdateTest.php b/framework/core/tests/integration/api/users/UpdateTest.php index f07229757..e143e6565 100644 --- a/framework/core/tests/integration/api/users/UpdateTest.php +++ b/framework/core/tests/integration/api/users/UpdateTest.php @@ -35,6 +35,7 @@ class UpdateTest extends TestCase ], 'group_permission' => [ ['permission' => 'viewUserList', 'group_id' => 3], + ['permission' => 'viewDiscussions', 'group_id' => 3] ] ]); }