Revision 5708
Added by ben leinfelder almost 14 years ago
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
73 | 73 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessControlException; |
74 | 74 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessControlForSingleFile; |
75 | 75 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessControlInterface; |
76 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessControlList; |
|
76 | 77 |
import edu.ucsb.nceas.metacat.cart.CartManager; |
77 | 78 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
78 | 79 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
... | ... | |
2783 | 2784 |
//insert permission |
2784 | 2785 |
AccessControlForSingleFile accessControl = |
2785 | 2786 |
new AccessControlForSingleFile(accessionNumber); |
2786 |
accessControl.insertPermissions(principal, Long.valueOf(permission), permType, permOrder);
|
|
2787 |
accessControl.insertPermissions(principal, Integer.valueOf(AccessControlList.intValue(permission)).longValue(), permType, permOrder);
|
|
2787 | 2788 |
} catch (Exception ee) { |
2788 | 2789 |
logMetacat.error("MetaCatServlet.handleSetAccessAction - Error inserting permission: " |
2789 | 2790 |
+ ee.getMessage()); |
... | ... | |
2804 | 2805 |
logMetacat.debug("MetaCatServlet.handleSetAccessAction - ForceReplicationHandler created: " + frh.toString()); |
2805 | 2806 |
|
2806 | 2807 |
} |
2807 |
successList.addElement("MetaCatServlet.handleSetAccessAction - successfully added individual access for doc id: " + docList[0]); |
|
2808 |
|
|
2808 |
if (errorList.isEmpty()) { |
|
2809 |
successList.addElement("MetaCatServlet.handleSetAccessAction - successfully added individual access for doc id: " + docList[0]); |
|
2810 |
} |
|
2809 | 2811 |
if (params.get("forwardto") != null) { |
2810 | 2812 |
try { |
2811 | 2813 |
RequestUtil.forwardRequest(request, response, params); |
Also available in: Unified diff
fix the setaccess() method so that it accepts strings not numbers (i.e. "read" not "4")