Revision 7083
Added by Chris Jones about 12 years ago
D1NodeService.java | ||
---|---|---|
345 | 345 |
|
346 | 346 |
} |
347 | 347 |
|
348 |
// check that we are not attempting to subvert versioning |
|
349 |
if (sysmeta.getObsoletes() != null && sysmeta.getObsoletes().getValue() != null) { |
|
350 |
throw new InvalidSystemMetadata("1180", |
|
351 |
"The supplied system metadata is invalid. " + |
|
352 |
"The obsoletes field cannot have a value when creating entries."); |
|
353 |
} |
|
354 |
if (sysmeta.getObsoletedBy() != null && sysmeta.getObsoletedBy().getValue() != null) { |
|
355 |
throw new InvalidSystemMetadata("1180", |
|
356 |
"The supplied system metadata is invalid. " + |
|
357 |
"The obsoletedBy field cannot have a value when creating entries."); |
|
358 |
} |
|
359 |
|
|
360 | 348 |
// TODO: this probably needs to be refined more |
361 | 349 |
try { |
362 | 350 |
allowed = isAuthorized(session, pid, Permission.WRITE); |
Also available in: Unified diff
Don't check for populated obsoletes and obsoletedBy fields during CN.create(), only MN.create(). The CN should expect that the MN has populated this field because of existing revision information, and should trust the MN information. Addresses https://redmine.dataone.org/issues/2507.