Project

General

Profile

« Previous | Next » 

Revision 7293

look up docid using mapped guid when checking permission on described data file
Addresses: http://support.nceas.ucsb.edu/rt/Ticket/Display.html?id=7490

View differences:

src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java
1404 1404
				if (distributionType == DistributionSection.DATA_DISTRIBUTION) {
1405 1405
					try {
1406 1406
						// check for the previous version for permissions on update
1407
						// we need to look up the docid from the guid, if we have it
1407 1408
						String dataDocid = distributionSection.getDataFileName();
1409
						try {
1410
							dataDocid = IdentifierManager.getInstance().getLocalId(dataDocid);
1411
						} catch (McdbDocNotFoundException mcdbnfe) {
1412
							// ignore
1413
							logMetacat.warn("Could not find guid/docid mapping for " + dataDocid);
1414
						}
1408 1415
						String previousDocid = dataDocid;
1409 1416
						if (action == "UPDATE") {
1410 1417
							String docidWithoutRev = DocumentUtil.getDocIdFromString(dataDocid);

Also available in: Unified diff