Fix permission check in UserSearcher

This commit is contained in:
Toby Zerner 2015-06-18 12:43:20 +09:30
parent fb4528b8c7
commit e6c2c52210

View File

@ -46,7 +46,7 @@ class UserSearcher implements SearcherInterface
public function search(UserSearchCriteria $criteria, $limit = null, $offset = 0, $load = [])
{
$this->user = $criteria->user;
$this->query = $this->users->query()->whereCan($criteria->user, 'view');
$this->query = $this->users->query()->whereVisibleTo($criteria->user);
$this->gambits->apply($criteria->query, $this);