diff options
Diffstat (limited to 'src/org/traccar/api/resource/DevicePermissionResource.java')
-rw-r--r-- | src/org/traccar/api/resource/DevicePermissionResource.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/api/resource/DevicePermissionResource.java b/src/org/traccar/api/resource/DevicePermissionResource.java index f77375cba..2ef436f11 100644 --- a/src/org/traccar/api/resource/DevicePermissionResource.java +++ b/src/org/traccar/api/resource/DevicePermissionResource.java @@ -38,6 +38,7 @@ public class DevicePermissionResource extends BaseResource { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().linkDevice(entity.getUserId(), entity.getDeviceId()); Context.getPermissionsManager().refresh(); + Context.getGeofenceManager().refresh(); return Response.ok(entity).build(); } @@ -46,6 +47,7 @@ public class DevicePermissionResource extends BaseResource { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().unlinkDevice(entity.getUserId(), entity.getDeviceId()); Context.getPermissionsManager().refresh(); + Context.getGeofenceManager().refresh(); return Response.noContent().build(); } |