diff --git a/lib/Controller/FoldersController.php b/lib/Controller/FoldersController.php index ee83f97f6..4816011b7 100644 --- a/lib/Controller/FoldersController.php +++ b/lib/Controller/FoldersController.php @@ -221,7 +221,7 @@ public function getFolder($folderId): JSONResponse { * @throws UnauthenticatedError */ public function addToFolder($folderId, $bookmarkId): JSONResponse { - if (!Authorizer::hasPermission(Authorizer::PERM_WRITE, $this->authorizer->getPermissionsForFolder($folderId, $this->request)) && + if (!Authorizer::hasPermission(Authorizer::PERM_WRITE, $this->authorizer->getPermissionsForFolder($folderId, $this->request)) || !Authorizer::hasPermission(Authorizer::PERM_EDIT, $this->authorizer->getPermissionsForBookmark($bookmarkId, $this->request))) { $res = new JSONResponse(['status' => 'error', 'data' => ['Not found']], Http::STATUS_NOT_FOUND); $res->throttle();