Project

General

Profile

« Previous | Next » 

Revision 7307

use docid, not the guid when returning the accesscontrol block

View differences:

src/edu/ucsb/nceas/metacat/accesscontrol/AccessControlForSingleFile.java
364 364
			accessfileid = xmlAccessDAOList.get(0).getAccessFileId();
365 365
			subtreeid = xmlAccessDAOList.get(0).getSubTreeId();
366 366
		}
367
		
368
		// get the docid for this guid
369
		String docid = _guid;
370
		try {
371
			docid = IdentifierManager.getInstance().getLocalId(_guid);
372
		} catch (McdbDocNotFoundException e) {
373
			logMetacat.warn("Could not lookup docid for guid, defaulting to guid: " + _guid, e);
374
		}
367 375

  
368
		output.append("<access authSystem=\"knb\" order=\"" + permOrder + "\" id=\"" + _guid + "\" scope=\"document\"");
376
		output.append("<access authSystem=\"knb\" order=\"" + permOrder + "\" id=\"" + docid + "\" scope=\"document\"");
369 377
		if (accessfileid != null) {
370 378
			output.append(" accessfileid=\"" + accessfileid + "\"");
371 379
		}

Also available in: Unified diff