boolean isAdmin = false;  try { isAdmin = AuthorizeManager.isAdmin(context); } catch (SQLException se) { log.warn("Unable to use AuthorizeManager " + se); } finally { request.setAttribute("is.admin", new Boolean(isAdmin)); }
    public static void loggedIn(Context context, HttpServletRequest request,            EPerson eperson)    {        HttpSession session = request.getSession();        context.setCurrentUser(eperson);        // We store the current user in the request as an EPerson object...        request.setAttribute("dspace.current.user", eperson);        // and in the session as an ID        session.setAttribute("dspace.current.user.id", new Integer(eperson                .getID()));        // and the remote IP address to compare against later requests        // so we can detect session hijacking.        session.setAttribute("dspace.current.remote.addr",                             request.getRemoteAddr());    }