diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index b0dca3a..90846eb 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1230,7 +1230,7 @@ class MSSQLDatabase extends SS_Database { foreach($result as $row){ $row_result=DataObject::get_by_id($row['Source'], $row['ID']); - $searchResults->push($row_result); + if($row_result->canView()) $searchResults->push($row_result); } $searchResults->setPageLimits($start, $pageLength, $totalCount);