response.sendError(HttpServletResponse.SC_NOT_FOUND,
"Researcher page not found");
return null;
}
Context context = UIUtil.obtainContext(request);
EPerson currUser = context.getCurrentUser();
boolean isAdmin = AuthorizeManager.isAdmin(context);
if (isAdmin
|| (currUser != null && (researcher.getEpersonID() != null && currUser
.getID() == researcher.getEpersonID())))
{
model.put("researcher_page_menu", new Boolean(true));
model.put("authority_key",
ResearcherPageUtils.getPersistentIdentifier(researcher));
if (isAdmin)
{
AuthorityDAO dao = AuthorityDAOFactory.getInstance(context);
long pendingItems = dao
.countIssuedItemsByAuthorityValueInAuthority(
RPAuthority.RP_AUTHORITY_NAME,
ResearcherPageUtils
.getPersistentIdentifier(researcher));
model.put("pendingItems", new Long(pendingItems));
}
}
else if ((researcher.getStatus() == null || researcher.getStatus()
.booleanValue() == false))
{
if (context.getCurrentUser() != null
|| Authenticate.startAuthentication(context, request,
response))
{
// Log the error
log.info(LogManager