Project

General

Profile

« Previous | Next » 

Revision 7291

use docid (not guid) when instantiating the PermissionController. Was getting an error with DOI-ified identifier and the metacat getaccesscontrol action:
https://knb.ecoinformatics.org/knb/metacat?action=getaccesscontrol&docid=Collinge.3.28
<error>
AccessControlForSingleFile.getACL() - MCDB error when getting ACL: No guid registered for docid doi:10.5063/AA/Collinge.3.28
</error>

View differences:

src/edu/ucsb/nceas/metacat/accesscontrol/AccessControlForSingleFile.java
285 285
		try {   
286 286
			hasPermission = isOwned(user);
287 287
			if (!hasPermission) {
288
				PermissionController controller = new PermissionController(_guid);
288
				// get the docid for this guid
289
				String docid = IdentifierManager.getInstance().getLocalId(_guid);
290
				PermissionController controller = new PermissionController(docid);
289 291
				hasPermission = 
290 292
					controller.hasPermission(user, groups, READSTRING);
291 293
			}

Also available in: Unified diff