diff --git a/src/hpc-server/hpc-app-service-impl/src/main/java/gov/nih/nci/hpc/service/impl/HpcMetadataValidator.java b/src/hpc-server/hpc-app-service-impl/src/main/java/gov/nih/nci/hpc/service/impl/HpcMetadataValidator.java index 35ea9c144..332a687a8 100644 --- a/src/hpc-server/hpc-app-service-impl/src/main/java/gov/nih/nci/hpc/service/impl/HpcMetadataValidator.java +++ b/src/hpc-server/hpc-app-service-impl/src/main/java/gov/nih/nci/hpc/service/impl/HpcMetadataValidator.java @@ -299,7 +299,8 @@ private void validateMetadata(List existingMetadataEntries, // If the restrict_metadata flag is set in the database, then ensure // that the add/update metadata entry defined in the validation rules // i.e. it is a mandatory or optional metadata for the applicable DOC - if (restrictMetadata && !allowSystemMetadata) { + if (restrictMetadata && !(allowSystemMetadata + && systemGeneratedMetadataAttributes.contains(metadataEntry.getAttribute()))) { // Do this check only for new files or collections so that fixing // of existing ones is not necessitated if (CollectionUtils.isNullOrEmpty(existingMetadataEntries)) {