aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/SessionResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-18 19:12:25 +1300
committerGitHub <noreply@github.com>2016-11-18 19:12:25 +1300
commit3eca9acd6e6a160df8f7b86150429c3d7c09b0c3 (patch)
treecb8bc7293a5c3fbac7f5e7557c73baded57109d8 /src/org/traccar/api/resource/SessionResource.java
parentf04881e56938315867a97db2027d58f27f7a20fd (diff)
parentf35da3ffdf6f960a877149b72b819a1979c9395a (diff)
downloadtrackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.tar.gz
trackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.tar.bz2
trackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.zip
Merge pull request #2548 from tananaev/users
Add user expiration and device limit
Diffstat (limited to 'src/org/traccar/api/resource/SessionResource.java')
-rw-r--r--src/org/traccar/api/resource/SessionResource.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/SessionResource.java b/src/org/traccar/api/resource/SessionResource.java
index 2847e41c1..a61738c7e 100644
--- a/src/org/traccar/api/resource/SessionResource.java
+++ b/src/org/traccar/api/resource/SessionResource.java
@@ -64,7 +64,7 @@ public class SessionResource extends BaseResource {
}
}
if (email != null && password != null) {
- User user = Context.getDataManager().login(email, password);
+ User user = Context.getPermissionsManager().login(email, password);
if (user != null) {
userId = user.getId();
request.getSession().setAttribute(USER_ID_KEY, userId);
@@ -73,6 +73,7 @@ public class SessionResource extends BaseResource {
}
if (userId != null) {
+ Context.getPermissionsManager().checkUser(userId);
return Context.getPermissionsManager().getUser(userId);
} else {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build());