aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/ServerServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/ServerServlet.java')
-rw-r--r--src/org/traccar/http/ServerServlet.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/http/ServerServlet.java b/src/org/traccar/http/ServerServlet.java
index baac99084..d814769a8 100644
--- a/src/org/traccar/http/ServerServlet.java
+++ b/src/org/traccar/http/ServerServlet.java
@@ -40,8 +40,9 @@ public class ServerServlet extends BaseServlet {
}
private void update(HttpServletRequest req, HttpServletResponse resp) throws Exception {
- Context.getDataManager().updateServer(JsonConverter.objectFromJson(
- req.getReader(), new Server()));
+ Server server = JsonConverter.objectFromJson(req.getReader(), new Server());
+ Context.getPermissionsManager().checkAdmin(getUserId(req));
+ Context.getDataManager().updateServer(server);
sendResponse(resp.getWriter(), true);
}