Revision 8360
Added by Jing Tao over 10 years ago
CNodeService.java | ||
---|---|---|
346 | 346 |
// check that it is CN/admin |
347 | 347 |
boolean allowed = isAdminAuthorized(session); |
348 | 348 |
|
349 |
// additional check if it is the authoritative node if it is not the admin |
|
350 |
if(!allowed) { |
|
351 |
allowed = isAuthoritativeMNodeAdmin(session, pid); |
|
352 |
} |
|
353 |
|
|
349 | 354 |
if (!allowed) { |
350 | 355 |
String msg = "The subject is not allowed to call delete() on a Coordinating Node."; |
351 | 356 |
logMetacat.info(msg); |
... | ... | |
397 | 402 |
// check that it is CN/admin |
398 | 403 |
boolean allowed = isAdminAuthorized(session); |
399 | 404 |
|
405 |
//check if it is the authoritative member node |
|
406 |
if(!allowed) { |
|
407 |
allowed = isAuthoritativeMNodeAdmin(session, pid); |
|
408 |
} |
|
409 |
|
|
400 | 410 |
if (!allowed) { |
401 | 411 |
String msg = "The subject is not allowed to call archive() on a Coordinating Node."; |
402 | 412 |
logMetacat.info(msg); |
... | ... | |
1345 | 1355 |
// are we allowed? |
1346 | 1356 |
boolean isAllowed = false; |
1347 | 1357 |
isAllowed = isAdminAuthorized(session); |
1358 |
|
|
1359 |
// additional check if it is the authoritative node if it is not the admin |
|
1360 |
if(!isAllowed) { |
|
1361 |
isAllowed = isAuthoritativeMNodeAdmin(session, pid); |
|
1362 |
} |
|
1348 | 1363 |
|
1349 | 1364 |
// proceed if we're called by a CN |
1350 | 1365 |
if ( isAllowed ) { |
Also available in: Unified diff
Add the methond named isAuthoritativeMNodeAdmin method. It applies to both CN and MN methods.