From 8dad0208975bf29e868a5ca9b6a844863f50d86c Mon Sep 17 00:00:00 2001 From: parveenkumaryadav Date: Wed, 10 Jan 2018 15:03:07 +0530 Subject: Odometer permission to both Admin or Manager --- src/org/traccar/api/resource/DeviceResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org') 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 { @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(); -- cgit v1.2.3