Skip to content

Commit

Permalink
catalog: add profile exception, #TASK-6445
Browse files Browse the repository at this point in the history
  • Loading branch information
pfurio committed Sep 20, 2024
1 parent 8874a65 commit 97768ac
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ private void autoCompleteNewJob(String organizationId, Study study, Job job, Jwt
job.setInput(Collections.emptyList());
} else {
// We only check input files if the job does not depend on other job that might be creating the necessary file.

List<File> inputFiles = getJobInputFilesFromParams(study.getFqn(), job, tokenPayload.getToken());
job.setInput(inputFiles);
}
Expand Down Expand Up @@ -458,9 +457,10 @@ public List<File> getJobInputFilesFromParams(String study, Job job, String token
// We look for files in the dynamic params
Map<String, Object> dynamicParams = (Map<String, Object>) entry.getValue();
for (Map.Entry<String, Object> subEntry : dynamicParams.entrySet()) {
if (subEntry.getKey().toLowerCase().endsWith(fileParamSuffix)) {
String subEntryKey = subEntry.getKey().toLowerCase();
if (!subEntryKey.contains("profile") && subEntryKey.endsWith(fileParamSuffix)) {
// We assume that every variable ending in 'file' corresponds to input files that need to be accessible in
// catalog
// catalog (except words such as 'profile')
try {
// Validate the user has access to the file
File file = catalogManager.getFileManager().get(study, (String) subEntry.getValue(),
Expand Down

0 comments on commit 97768ac

Please sign in to comment.