This commit is contained in:
Francesco Mangiacrapa 2023-05-30 14:01:35 +02:00
parent 9e925d15d8
commit 6fef972adc
3 changed files with 7 additions and 2 deletions

View File

@ -6,4 +6,5 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v1.0.0] ## [v1.0.0]
- Fixed #25201
- First release - First release

View File

@ -523,6 +523,7 @@ public class Geoportal_JSON_Mapper {
LOG.debug("data to string: " + data.toString()); LOG.debug("data to string: " + data.toString());
List<FilePathDV> fileSetPaths = gcubeProfileDV.getFilePaths(); List<FilePathDV> fileSetPaths = gcubeProfileDV.getFilePaths();
LOG.debug("gcubeProfileDV "+gcubeProfileDV.getGcubeName() + " fileSetPaths: "+fileSetPaths);
String filesetPath = JSON_$_POINTER; String filesetPath = JSON_$_POINTER;
if (fileSetPaths != null && fileSetPaths.size() > 0) { if (fileSetPaths != null && fileSetPaths.size() > 0) {
//Reading the first fieldName that defines the name of the "fileset" field //Reading the first fieldName that defines the name of the "fileset" field
@ -530,6 +531,7 @@ public class Geoportal_JSON_Mapper {
filesetPath +="."+firstOne.getFieldName(); filesetPath +="."+firstOne.getFieldName();
} }
LOG.debug("filesetPath is: "+filesetPath);
// Splitting the General Document in bson.Document according to list of // Splitting the General Document in bson.Document according to list of
// GcubeProfiles // GcubeProfiles
@ -550,7 +552,7 @@ public class Geoportal_JSON_Mapper {
String jsonString = dataArray.get(i).toString(); String jsonString = dataArray.get(i).toString();
LOG.debug("the array " + i + " JSON to string: " + jsonString); LOG.debug("the array " + i + " JSON to string: " + jsonString);
Document sectionDoc = Document.parse(jsonString); Document sectionDoc = Document.parse(jsonString);
boolean isAccessibleSection = isAccessibleSectionAccordingToPolicy(sectionDoc, sectionJSONPath, boolean isAccessibleSection = isAccessibleSectionAccordingToPolicy(sectionDoc, filesetPath,
username); username);
if (isAccessibleSection) { if (isAccessibleSection) {
listBSONDocument.add(sectionDoc); listBSONDocument.add(sectionDoc);

View File

@ -41,7 +41,9 @@ public class Geoportal_DataMapper_Tests {
//private static String PROFILE_ID = "concessioni-estere"; //private static String PROFILE_ID = "concessioni-estere";
private static String PROFILE_ID = "profiledConcessioni"; private static String PROFILE_ID = "profiledConcessioni";
private static String PROJECT_ID = "6442653ac6a0422d9e9042e0"; //63d011c4dcac4551b9a6b930 //6442653ac6a0422d9e9042e0 //6399de3ca0a4545420373251 private static String PROJECT_ID = "6475a6a2a827c6201915917d"; //63d011c4dcac4551b9a6b930 //6442653ac6a0422d9e9042e0 //6399de3ca0a4545420373251
//IMPORTANT!!!! #NB SET USERNAME = null to test PUBLIC ACCESS
private static String USERNAME = "francesco.mangiacrapa"; private static String USERNAME = "francesco.mangiacrapa";