Context context = UIUtil.obtainContext(request);
EPerson currentUser = context.getCurrentUser();
if ((currentUser==null || (researcher.getEpersonID()!=null && currentUser.getID()!=researcher.getEpersonID()))
&& !AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin can edit not personal researcher page");
}
if (AuthorizeManager.isAdmin(context))
{
isAdmin = true;
}
Integer areaId;
if (paramTabId == null)
{
if (paramFuzzyTabId == null)
{
List<EditTabResearcherPage> tabs = getApplicationService()
.getTabsByVisibility(
EditTabResearcherPage.class, isAdmin);
if (tabs.isEmpty())
{
throw new AuthorizeException("No tabs defined!!");
}
areaId = tabs.get(0).getId();
}
else
{