From 317a81e865e4216f61069a181730b17518d76645 Mon Sep 17 00:00:00 2001 From: Jon Van Oast Date: Fri, 20 Dec 2024 16:23:08 -0700 Subject: [PATCH] bugfix --- src/main/java/org/ecocean/EncounterQueryProcessor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ecocean/EncounterQueryProcessor.java b/src/main/java/org/ecocean/EncounterQueryProcessor.java index bceb5748d4..5b020bd3b2 100644 --- a/src/main/java/org/ecocean/EncounterQueryProcessor.java +++ b/src/main/java/org/ecocean/EncounterQueryProcessor.java @@ -105,7 +105,8 @@ public static String queryStringBuilder(HttpServletRequest request, StringBuffer return failed; } // Encounter enc = myShepherd.getEncounter(hId); - boolean hasAccess = Encounter.opensearchAccess(h, user, myShepherd); + boolean hasAccess = Encounter.opensearchAccess(h.optJSONObject("_source"), user, + myShepherd); if (hasAccess) encIds.add(hId); } } catch (Exception ex) { @@ -1598,7 +1599,8 @@ public static EncounterQueryResult processQuery(Shepherd myShepherd, HttpServlet return new EncounterQueryResult(rEncounters, searchQuery.toString(), "OpenSearch id " + searchQueryId); } - boolean hasAccess = Encounter.opensearchAccess(h, user, myShepherd); + boolean hasAccess = Encounter.opensearchAccess(h.optJSONObject("_source"), user, + myShepherd); if (hasAccess) { Encounter enc = myShepherd.getEncounter(hId); if (enc != null) rEncounters.add(enc);