diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 85d166f3b7db70277abb0da1e0169fc3a4bd3dbb..2798a688ae76816c6df1b870fef87a3214701b40 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -392,7 +392,9 @@ class AbstractSearch extends AbstractBase // Fail if user has no permission to view this search: $user = $this->getUser(); $sessId = $this->getServiceLocator()->get('VuFind\SessionManager')->getId(); - if ($search->session_id != $sessId && $search->user_id != $user->id) { + if ($search->session_id != $sessId + && ($user === false || $search->user_id != $user->id) + ) { $this->flashMessenger()->addMessage('advSearchError_noRights', 'error'); return false; }