This commit is contained in:
Alexander Skvortsov 2020-09-24 11:30:27 -04:00 committed by GitHub
parent abcf55152f
commit 3a02edb15f
2 changed files with 2 additions and 1 deletions

View File

@ -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 {

View File

@ -35,6 +35,7 @@ class UpdateTest extends TestCase
],
'group_permission' => [
['permission' => 'viewUserList', 'group_id' => 3],
['permission' => 'viewDiscussions', 'group_id' => 3]
]
]);
}