diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-24 14:55:06 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-24 14:55:06 +1200 |
commit | ea0bdea88003f46fd6f6164d5c45e33d53f47c81 (patch) | |
tree | d8e51a10e56f7e916cc2bf7486d75c90feb5696e /src/org/traccar/api/resource/SessionResource.java | |
parent | a645eb8e2338f11e2c807045b1787a47cd1f1464 (diff) | |
parent | f6484e9808f50aa997f028f9421b05aad6aed8bd (diff) | |
download | traccar-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.gz traccar-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.bz2 traccar-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.zip |
Merge pull request #2242 from Abyss777/users_cache
Implement users cache
Diffstat (limited to 'src/org/traccar/api/resource/SessionResource.java')
-rw-r--r-- | src/org/traccar/api/resource/SessionResource.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/SessionResource.java b/src/org/traccar/api/resource/SessionResource.java index 49670c1f9..deed70b37 100644 --- a/src/org/traccar/api/resource/SessionResource.java +++ b/src/org/traccar/api/resource/SessionResource.java @@ -73,7 +73,7 @@ public class SessionResource extends BaseResource { } if (userId != null) { - return Context.getDataManager().getUser(userId); + return Context.getPermissionsManager().getUser(userId); } else { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); } @@ -83,7 +83,7 @@ public class SessionResource extends BaseResource { @POST public User add( @FormParam("email") String email, @FormParam("password") String password) throws SQLException { - User user = Context.getDataManager().login(email, password); + User user = Context.getPermissionsManager().login(email, password); if (user != null) { request.getSession().setAttribute(USER_ID_KEY, user.getId()); return user; |