Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 1716-mn-reindex #1738

Merged
merged 13 commits into from
Nov 29, 2023
Merged
11 changes: 8 additions & 3 deletions src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3512,17 +3512,22 @@ public boolean reindex(Session session, List<Identifier> identifiers, boolean al
String serviceFailureCode = "5901";
String notAuthorizedCode = "5902";
String notAuthorizedError ="The provided identity does not have permission to reindex "
+ "objects on the Node.";
+ "objects on the Node: ";
if (session == null) {
throw new NotAuthorized(notAuthorizedCode,notAuthorizedError);
throw new NotAuthorized(notAuthorizedCode,notAuthorizedError + "public");
taojing2002 marked this conversation as resolved.
Show resolved Hide resolved
}
try {
Identifier identifier = null;
D1AuthHelper authDel =
new D1AuthHelper(request, identifier, notAuthorizedCode, serviceFailureCode);
authDel.doAdminAuthorization(session);
} catch (NotAuthorized na) {
throw new NotAuthorized(notAuthorizedCode,notAuthorizedError);
if (session.getSubject() != null) {
throw new NotAuthorized(notAuthorizedCode,notAuthorizedError
taojing2002 marked this conversation as resolved.
Show resolved Hide resolved
+ session.getSubject().getValue());
} else {
throw new NotAuthorized(notAuthorizedCode,notAuthorizedError + "public");
taojing2002 marked this conversation as resolved.
Show resolved Hide resolved
}
}

if (all) {
Expand Down