check access on document in 'searchdocument'

This commit is contained in:
Uwe Steinmann 2022-09-14 20:40:33 +02:00
parent 3283d35db8
commit 5a806f729b

View File

@ -133,7 +133,9 @@ switch($command) {
if($hits) {
$result = array();
foreach($hits['docs'] as $hit) {
$result[] = $hit->getID().'#'.$hit->getName();
if($hit->getAccessMode($user, 'search') >= M_READ) {
$result[] = $hit->getID().'#'.$hit->getName();
}
}
header('Content-Type: application/json');
echo json_encode($result);