comparison flys-client/src/main/java/de/intevation/flys/client/client/services/RemoteServiceServlet.java @ 3491:1c9bfdbfb265

Add new RemoteServiceServlet class Implement an extended GWT RemoteServiceServlet to be able to get the current logged in user easily. This class can be used as a base class for all flys RemoteServices if the current user and the allowed features have to be evaluated. flys-client/trunk@5207 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 15 Aug 2012 12:08:20 +0000
parents
children 98fac4872ae6
comparison
equal deleted inserted replaced
3490:5f628a13ca9f 3491:1c9bfdbfb265
1 package de.intevation.flys.client.server;
2
3 import javax.servlet.http.HttpSession;
4
5 import de.intevation.flys.client.server.auth.User;
6
7 public class RemoteServiceServlet
8 extends com.google.gwt.user.server.rpc.RemoteServiceServlet
9 {
10 /**
11 * Return the current logged in user from the HTTP Session
12 */
13 public User getUser() {
14 HttpSession session = this.getThreadLocalRequest().getSession();
15 return (User)session.getAttribute("user");
16 }
17 }

http://dive4elements.wald.intevation.org