Revision 1081
Added by Jing Tao over 22 years ago
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
1410 | 1410 |
//merge the differences manually. |
1411 | 1411 |
int istreamInt; |
1412 | 1412 |
char istreamChar; |
1413 |
|
|
1414 |
// check for 'write' permission for 'user' to update this document |
|
1415 |
if ( !hasPermission(conn, user, groups, docid) ) { |
|
1416 |
throw new Exception("User " + user + |
|
1417 |
" does not have permission to update XML Document #" + accnum); |
|
1418 |
} |
|
1419 |
|
|
1413 | 1420 |
DocumentIdentifier id = new DocumentIdentifier(accnum); |
1414 | 1421 |
String updaterev = id.getRev(); |
1415 | 1422 |
String server = MetacatReplication.getServer(serverCode); |
Also available in: Unified diff
Add a access control for MetaCatServlet to update a document which home server is not local metacat.