Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
naknomum committed Dec 20, 2024
1 parent 089329c commit 317a81e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/ecocean/EncounterQueryProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 317a81e

Please sign in to comment.