teichmann@5861: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5861: * Software engineering by Intevation GmbH teichmann@5861: * teichmann@5993: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5861: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5993: * documentation coming with Dive4Elements River for details. teichmann@5861: */ teichmann@5861: teichmann@5835: package org.dive4elements.river.client.server; ingo@3548: teichmann@5835: import org.dive4elements.river.client.server.auth.User; ingo@3548: ingo@3548: import javax.servlet.http.HttpSession; ingo@3548: ingo@3548: public class RemoteServiceServlet ingo@3548: extends com.google.gwt.user.server.rpc.RemoteServiceServlet ingo@3548: { ingo@3548: /** felix@7134: * Return the current logged in user from the HTTP Session. christian@3696: */ ingo@3548: public User getUser() { ingo@3548: HttpSession session = this.getThreadLocalRequest().getSession(); ingo@3548: return (User)session.getAttribute("user"); ingo@3548: } ingo@3548: } felix@3849: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :