mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 10:14:16 +08:00
This commit is contained in:
parent
abcf55152f
commit
3a02edb15f
|
@ -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…
Reference in New Issue
Block a user