aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-20 14:42:01 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-20 14:42:01 +1300
commit5947767811b376a26c550661a7f5362d0d884f84 (patch)
tree99bf9b319840c3163f7da644281138bc495971a9 /src/org/traccar/web
parent3eff91673944f202e0aebe20faa925011568b685 (diff)
downloadtrackermap-server-5947767811b376a26c550661a7f5362d0d884f84.tar.gz
trackermap-server-5947767811b376a26c550661a7f5362d0d884f84.tar.bz2
trackermap-server-5947767811b376a26c550661a7f5362d0d884f84.zip
Remove generic method for permissions
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/CommandServlet.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/web/CommandServlet.java b/src/org/traccar/web/CommandServlet.java
index d307913df..2f1493193 100644
--- a/src/org/traccar/web/CommandServlet.java
+++ b/src/org/traccar/web/CommandServlet.java
@@ -51,7 +51,7 @@ public class CommandServlet extends BaseServlet {
private void send(HttpServletRequest req, HttpServletResponse resp) throws Exception {
Command command = JsonConverter.objectFromJson(req.getReader(), Command.class);
- Context.getPermissionsManager().check(Device.class, getUserId(req), command.getDeviceId());
+ Context.getPermissionsManager().checkDevice(getUserId(req), command.getDeviceId());
getActiveDevice(command.getDeviceId()).sendCommand(command);
sendResponse(resp.getWriter(), true);
}
@@ -60,7 +60,7 @@ public class CommandServlet extends BaseServlet {
JsonObject json = Json.createReader(req.getReader()).readObject();
long deviceId = json.getJsonNumber("deviceId").longValue();
String command = json.getString("command");
- Context.getPermissionsManager().check(Device.class, getUserId(req), deviceId);
+ Context.getPermissionsManager().checkDevice(getUserId(req), deviceId);
getActiveDevice(deviceId).write(command);
sendResponse(resp.getWriter(), true);
}