aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorparveenkumaryadav <parveenkumardeeva@gmail.com>2018-01-10 15:03:07 +0530
committerparveenkumaryadav <parveenkumardeeva@gmail.com>2018-01-10 15:03:07 +0530
commit8dad0208975bf29e868a5ca9b6a844863f50d86c (patch)
treea17cf2f43ee0a8aad743acc2d4aabd68b2ea87ce /src/org/traccar/api
parent232de5f0daef98f31b28d177d991fdbfa191f195 (diff)
downloadtrackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.tar.gz
trackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.tar.bz2
trackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.zip
Odometer permission to both Admin or Manager
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index 0ea532567..c432a04f4 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -88,7 +88,7 @@ public class DeviceResource extends BaseObjectResource<Device> {
@Path("{id}/distance")
@PUT
public Response updateTotalDistance(DeviceTotalDistance entity) throws SQLException {
- Context.getPermissionsManager().checkAdmin(getUserId());
+ Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId());
Context.getDeviceManager().resetTotalDistance(entity);
LogAction.resetTotalDistance(getUserId(), entity.getDeviceId());
return Response.noContent().build();