@Override public boolean isAdmin(Context c, EPerson e) throws SQLException { // if we're ignoring authorization, user is member of admin if (c.ignoreAuthorization()) { return true; } if (e == null) { return false; // anonymous users can't be admins.... } else { return groupService.isMember(c, e, Group.ADMIN); } }
@Override public boolean isAdmin(Context c) throws SQLException { // if we're ignoring authorization, user is member of admin if (c.ignoreAuthorization()) { return true; } EPerson e = c.getCurrentUser(); if (e == null) { return false; // anonymous users can't be admins.... } else { return groupService.isMember(c, Group.ADMIN); } }
if (ctx.getCurrentUser() == null && !ctx.ignoreAuthorization()) { log.warn("You are running one or more Site-Wide curation tasks in ANONYMOUS USER mode," + " as there is no EPerson 'performer' associated with this task. To associate an EPerson " +
@Override public void update(Context context, EPerson ePerson) throws SQLException, AuthorizeException { // Check authorisation - if you're not the eperson // see if the authorization system says you can if (!context.ignoreAuthorization() && ((context.getCurrentUser() == null) || (ePerson.getID() != context .getCurrentUser().getID()))) { authorizeService.authorizeAction(context, ePerson, Constants.WRITE); } super.update(context, ePerson); ePersonDAO.save(context, ePerson); log.info(LogManager.getHeader(context, "update_eperson", "eperson_id=" + ePerson.getID())); if (ePerson.isModified()) { context.addEvent(new Event(Event.MODIFY, Constants.EPERSON, ePerson.getID(), null, getIdentifiers(context, ePerson))); ePerson.clearModified(); } if (ePerson.isMetadataModified()) { ePerson.clearDetails(); } }
boolean ignoreAuth = context.ignoreAuthorization(); context.setIgnoreAuthorization(true);
boolean ignore = context.ignoreAuthorization(); context.setIgnoreAuthorization(true); installedItem.update();
if (c.ignoreAuthorization()) { return true;
boolean ignoreAuth = context.ignoreAuthorization(); context.setIgnoreAuthorization(true);
boolean ignoreAuth = context.ignoreAuthorization(); context.setIgnoreAuthorization(true);