Merge pull request #524 from romainneutron/fix-1312

Fix #1312 : Users must have edit right to search in collections
This commit is contained in:
Romain Neutron
2013-07-19 02:39:41 -07:00

View File

@@ -631,7 +631,7 @@ class SearchEngineOptions
$bas = array_filter($bas, function($collection) use ($app) {
if ($app['authentication']->isAuthenticated()) {
return $app['authentication']->getUser()->ACL()->has_right_on_base($collection->get_base_id(), 'canmodifrecord');
return $app['authentication']->getUser()->ACL()->has_access_to_base($collection->get_base_id());
} else {
return in_array($collection, $app->getOpenCollections());
}