From eaa4170e64f096030bd2d51d11b5d8e0f72bc6c3 Mon Sep 17 00:00:00 2001 From: Kamil Karkoszka Date: Thu, 23 Jan 2020 13:59:41 +0100 Subject: [PATCH] Fixed loading of shortcuts for current user (consideration of shareGlobally) (#77) --- src/Controller/AdminController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index c6c310b..ec24919 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -441,8 +441,9 @@ public function loadShortCutsAction(Request $request) { $list = new SavedSearch\Listing(); $list->setCondition( - "(ownerId = ? OR sharedUserIds LIKE ?) AND shortCutUserIds LIKE ?", + "(shareGlobally = ? OR ownerId = ? OR sharedUserIds LIKE ?) AND shortCutUserIds LIKE ?", [ + true, $this->getAdminUser()->getId(), '%,' . $this->getAdminUser()->getId() . ',%', '%,' . $this->getAdminUser()->getId() . ',%'