Skip to content

Commit

Permalink
Fix project_name
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPeck committed Jul 20, 2023
1 parent ae2e4bd commit 0193bb8
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,13 @@ private Set<Privilege> addFENCEPrivileges(User u, Role r) {
//e.g. FENCE_phs0000xx_c2
String[] parts = roleName.split("_");
String project_name = parts[1];
String consent_group = (parts.length > 2 && parts[2].startsWith("c")) ? parts[2] : "";


String consent_group = "";
if (parts.length > 2 && parts[2].startsWith("c")) {
project_name = project_name + "_" + parts[2];
} else if (parts.length > 2) {
consent_group = parts[2];
}

// Look up the metadata by consent group.
Map projectMetadata = getFENCEMappingforProjectAndConsent(project_name, consent_group);

Expand Down

0 comments on commit 0193bb8

Please sign in to comment.