Skip to content

Commit

Permalink
Merge pull request #809 from AtlasOfLivingAustralia/hotfix_download_f…
Browse files Browse the repository at this point in the history
…ields

Hotfix download fields
  • Loading branch information
adam-collins authored Jun 6, 2023
2 parents c56b956 + 4001a58 commit 6105262
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repositories {

group = 'au.org.ala'

version = '3.1.6'
version = '3.1.7'


boolean inplace = false
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/au/org/ala/biocache/dao/SearchDAOImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,8 @@ public DownloadHeaders writeResultsFromIndexToStream(final DownloadRequestDTO do
dd.resetCounts();

// prepare requested download fields (defaults, substitutions)
prepareRequestedFields(downloadParams, !(dd.getAlaUser() == null || dd.getAlaUser().getRoles().isEmpty()));
boolean hasSensitiveRecordAccess = downloadService.getSensitiveFq(dd.getAlaUser() == null ? Collections.emptySet() : dd.getAlaUser().getRoles()) != null;
prepareRequestedFields(downloadParams, hasSensitiveRecordAccess);

// prepare headers
DownloadHeaders downloadHeaders = prepareHeaders(downloadParams);
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/au/org/ala/biocache/dto/OccurrenceIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,14 @@ public class OccurrenceIndex {
"sensitive_day",
"sensitive_eventID",
"sensitive_eventTime",
"sensitive_footprintWKT"};
"sensitive_footprintWKT",
"sensitive_locationRemarks",
"sensitive_month",
"sensitive_verbatimCoordinates",
"sensitive_verbatimEventDate",
"sensitive_verbatimLatitude",
"sensitive_verbatimLocality",
"sensitive_verbatimLongitude"};
public static final String[] notSensitiveSOLRHdr = {LONGITUDE, LATITUDE, LOCALITY, EVENT_DATE, EVENT_DATE_END, GRID_REFERENCE, COORDINATE_UNCERTAINTY, DAY, EVENT_ID, FOOTPRINT_WKT};
public static final String CONTAINS_SENSITIVE_PATTERN = StringUtils.join(sensitiveSOLRHdr, "|");

Expand Down

0 comments on commit 6105262

Please sign in to comment.