Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/server/auth/was/User.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/server/auth/was/User.java@1387cdeb8d93 |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
1 package de.intevation.flys.client.server.auth.was; | |
2 | |
3 import java.util.Date; | |
4 import java.util.List; | |
5 | |
6 import de.intevation.flys.client.server.auth.DefaultUser; | |
7 | |
8 public class User | |
9 extends DefaultUser | |
10 implements de.intevation.flys.client.server.auth.User { | |
11 | |
12 private Assertion assertion; | |
13 | |
14 public User(String name, | |
15 String password, | |
16 String account, | |
17 List<String> roles, | |
18 Assertion assertion, | |
19 List<String> features | |
20 ) { | |
21 this.setName(name); | |
22 this.setPassword(password); | |
23 this.setRoles(roles); | |
24 this.assertion = assertion; | |
25 this.setAllowedFeatures(features); | |
26 this.setAccount(account); | |
27 } | |
28 | |
29 @Override | |
30 public boolean hasExpired() { | |
31 Date until = this.assertion.getUntil(); | |
32 if (until != null) { | |
33 Date current = new Date(); | |
34 return !current.after(until); | |
35 } | |
36 return false; | |
37 } | |
38 } | |
39 | |
40 // vim:set ts=4 sw=4 si et fenc=utf8 tw=80: |