Skip to content

Commit

Permalink
Repositioned harmonized consent path escaping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Jun 7, 2024
1 parent b5e322f commit d048def
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ public Response getFENCEProfile(String callback_url, Map<String, String> authReq
throw new NotAuthorizedException("The user details could not be persisted. Please contact the administrator.");
}

if (fence_harmonized_concept_path != null && !fence_harmonized_concept_path.contains("\\\\")) {
fence_harmonized_concept_path = fence_harmonized_concept_path.replaceAll("\\\\", "\\\\\\\\");
logger.debug("Escaped harmonized consent path: {}", fence_harmonized_concept_path);
}


// Update the user's roles (or create them if none exists)
//Set<Role> actual_user_roles = u.getRoles();
Expand Down Expand Up @@ -502,6 +499,10 @@ private Privilege upsertClinicalPrivilege(String studyIdentifier, String project
logger.debug("Escaped consent concept path: {}", consent_concept_path);
}

if (fence_harmonized_concept_path != null && !fence_harmonized_concept_path.contains("\\\\")) {
fence_harmonized_concept_path = fence_harmonized_concept_path.replaceAll("\\\\", "\\\\\\\\");
logger.debug("Escaped harmonized consent path: {}", fence_harmonized_concept_path);
}

String studyIdentifierField = (consent_group != null && !consent_group.isEmpty()) ? studyIdentifier + "." + consent_group : studyIdentifier;
String queryTemplateText = String.format(
Expand Down

0 comments on commit d048def

Please sign in to comment.