From 473286c76b5735ae48aac694a154b3591f125214 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Fri, 25 Oct 2024 09:57:17 -0400 Subject: [PATCH 1/2] fix blank query, emphasize Guest user in comment --- .../edu/harvard/iq/dataverse/search/SearchServiceBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java index 245f778da23..6fadd9a04a3 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java @@ -332,7 +332,7 @@ public SolrQueryResponse search( // PERMISSION FILTER QUERY // ----------------------------------- String permissionFilterQuery = this.getPermissionFilterQuery(dataverseRequest, solrQuery, onlyDatatRelatedToMe, addFacets); - if (permissionFilterQuery != null) { + if (!StringUtils.isBlank(permissionFilterQuery)) { solrQuery.addFilterQuery(permissionFilterQuery); } @@ -1047,7 +1047,7 @@ private String getPermissionFilterQuery(DataverseRequest dataverseRequest, SolrQ // add joins on all the non-public groups that may exist for the // user: - // Authenticated users and GuestUser may be part of one or more groups; such + // Authenticated users - and GuestUser - may be part of one or more groups; such // as IP Groups. groups = groupService.collectAncestors(groupService.groupsFor(dataverseRequest)); From 940b3fb3f99d587238c41b141d7299f8aefc2bd7 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Fri, 25 Oct 2024 10:22:01 -0400 Subject: [PATCH 2/2] alternate way of emphasizing --- .../java/edu/harvard/iq/dataverse/search/SearchServiceBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java index 6fadd9a04a3..de75c88009f 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java @@ -1047,7 +1047,7 @@ private String getPermissionFilterQuery(DataverseRequest dataverseRequest, SolrQ // add joins on all the non-public groups that may exist for the // user: - // Authenticated users - and GuestUser - may be part of one or more groups; such + // Authenticated users, *and the GuestUser*, may be part of one or more groups; such // as IP Groups. groups = groupService.collectAncestors(groupService.groupsFor(dataverseRequest));