diff options
author | parveenkumaryadav <parveenkumardeeva@gmail.com> | 2018-01-10 15:03:07 +0530 |
---|---|---|
committer | parveenkumaryadav <parveenkumardeeva@gmail.com> | 2018-01-10 15:03:07 +0530 |
commit | 8dad0208975bf29e868a5ca9b6a844863f50d86c (patch) | |
tree | a17cf2f43ee0a8aad743acc2d4aabd68b2ea87ce | |
parent | 232de5f0daef98f31b28d177d991fdbfa191f195 (diff) | |
download | trackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.tar.gz trackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.tar.bz2 trackermap-server-8dad0208975bf29e868a5ca9b6a844863f50d86c.zip |
Odometer permission to both Admin or Manager
-rw-r--r-- | src/org/traccar/api/resource/DeviceResource.java | 2 |
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(); |