Revision 6373
Added by ben leinfelder over 13 years ago
src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java | ||
---|---|---|
291 | 291 |
Permission permission = null; |
292 | 292 |
try { |
293 | 293 |
String perm = params.get("permission")[0]; |
294 |
permission = Permission.valueOf(perm);
|
|
294 |
permission = Permission.convert(perm);
|
|
295 | 295 |
} catch (Exception e) { |
296 | 296 |
logMetacat.warn("No permission specified"); |
297 | 297 |
} |
... | ... | |
408 | 408 |
|
409 | 409 |
if (params.containsKey("event")) { |
410 | 410 |
eventName = params.get("event")[0]; |
411 |
event = Event.valueOf(eventName);
|
|
411 |
event = Event.convert(eventName);
|
|
412 | 412 |
} |
413 | 413 |
|
414 | 414 |
MonitorList monitorList = MNodeService.getInstance().getOperationStatistics(session, fromDate, toDate, subject, event, fmtid); |
src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java | ||
---|---|---|
708 | 708 |
Identifier pid = new Identifier(); |
709 | 709 |
pid.setValue(id); |
710 | 710 |
String permission = params.get("permission")[0]; |
711 |
boolean result = CNodeService.getInstance().isAuthorized(session, pid, Permission.valueOf(permission));
|
|
711 |
boolean result = CNodeService.getInstance().isAuthorized(session, pid, Permission.convert(permission));
|
|
712 | 712 |
response.setStatus(200); |
713 | 713 |
response.setContentType("text/xml"); |
714 | 714 |
return result; |
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
213 | 213 |
try { |
214 | 214 |
// delete the document |
215 | 215 |
DocumentImpl.delete(localId, username, groupnames, null); |
216 |
EventLog.getInstance().log(metacatUrl, username, localId, Event.DELETE.toString());
|
|
216 |
EventLog.getInstance().log(metacatUrl, username, localId, Event.DELETE.xmlValue());
|
|
217 | 217 |
|
218 | 218 |
} catch (McdbDocNotFoundException e) { |
219 | 219 |
throw new InvalidRequest("1322", "The provided identifier was invalid."); |
Also available in: Unified diff
use correct enum method