aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/DriverResource.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-21 13:06:18 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-21 13:06:18 +0500
commit55d91ec7a86777bb0427422c15c2b8a60aa00071 (patch)
tree55d989c8241b18891aa0b479f8e14533cc35d625 /src/org/traccar/api/resource/DriverResource.java
parent4b51fef3521e5b0bf338f631ad99e7affe9a1837 (diff)
downloadtrackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.tar.gz
trackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.tar.bz2
trackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.zip
Implement type constants
Diffstat (limited to 'src/org/traccar/api/resource/DriverResource.java')
-rw-r--r--src/org/traccar/api/resource/DriverResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/DriverResource.java b/src/org/traccar/api/resource/DriverResource.java
index 749674002..b528a197a 100644
--- a/src/org/traccar/api/resource/DriverResource.java
+++ b/src/org/traccar/api/resource/DriverResource.java
@@ -95,7 +95,7 @@ public class DriverResource extends BaseResource {
@PUT
public Response update(Driver entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission("driver", getUserId(), entity.getId());
+ Context.getPermissionsManager().checkPermission(Context.TYPE_DRIVER, getUserId(), entity.getId());
Context.getDriversManager().updateItem(entity);
return Response.ok(entity).build();
}
@@ -104,7 +104,7 @@ public class DriverResource extends BaseResource {
@DELETE
public Response remove(@PathParam("id") long id) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission("driver", getUserId(), id);
+ Context.getPermissionsManager().checkPermission(Context.TYPE_DRIVER, getUserId(), id);
Context.getDriversManager().removeItem(id);
return Response.noContent().build();
}