aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/GroupDriverResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource/GroupDriverResource.java')
-rw-r--r--src/org/traccar/api/resource/GroupDriverResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/GroupDriverResource.java b/src/org/traccar/api/resource/GroupDriverResource.java
index 76fc2892c..71c1aca29 100644
--- a/src/org/traccar/api/resource/GroupDriverResource.java
+++ b/src/org/traccar/api/resource/GroupDriverResource.java
@@ -39,7 +39,7 @@ public class GroupDriverResource extends BaseResource {
public Response add(GroupDriver entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getPermissionsManager().checkGroup(getUserId(), entity.getGroupId());
- Context.getPermissionsManager().checkDriver(getUserId(), entity.getDriverId());
+ Context.getPermissionsManager().checkPermission("driver", getUserId(), entity.getDriverId());
Context.getDataManager().linkGroupDriver(entity.getGroupId(), entity.getDriverId());
Context.getDriversManager().refresh();
return Response.ok(entity).build();
@@ -49,7 +49,7 @@ public class GroupDriverResource extends BaseResource {
public Response remove(GroupDriver entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getPermissionsManager().checkGroup(getUserId(), entity.getGroupId());
- Context.getPermissionsManager().checkDriver(getUserId(), entity.getDriverId());
+ Context.getPermissionsManager().checkPermission("driver", getUserId(), entity.getDriverId());
Context.getDataManager().unlinkGroupDriver(entity.getGroupId(), entity.getDriverId());
Context.getDriversManager().refresh();
return Response.noContent().build();