mirror of
https://github.com/flarum/core.git
synced 2025-01-29 12:42:32 +01:00
This commit is contained in:
parent
87634449c0
commit
6d38de9c8f
@ -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 {
|
||||
|
@ -35,6 +35,7 @@ class UpdateTest extends TestCase
|
||||
],
|
||||
'group_permission' => [
|
||||
['permission' => 'viewUserList', 'group_id' => 3],
|
||||
['permission' => 'viewDiscussions', 'group_id' => 3]
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user