From 21bf1014e55ab8049e18ee991c6ee80b23d1789c Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 23 Aug 2016 14:48:01 +0500 Subject: Implement cache for users objects --- src/org/traccar/api/resource/DevicePermissionResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/api/resource/DevicePermissionResource.java') diff --git a/src/org/traccar/api/resource/DevicePermissionResource.java b/src/org/traccar/api/resource/DevicePermissionResource.java index 7de050074..7faa1ab09 100644 --- a/src/org/traccar/api/resource/DevicePermissionResource.java +++ b/src/org/traccar/api/resource/DevicePermissionResource.java @@ -37,7 +37,7 @@ public class DevicePermissionResource extends BaseResource { public Response add(DevicePermission entity) throws SQLException { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().linkDevice(entity.getUserId(), entity.getDeviceId()); - Context.getPermissionsManager().refresh(); + Context.getPermissionsManager().refreshPermissions(); if (Context.getGeofenceManager() != null) { Context.getGeofenceManager().refresh(); } @@ -48,7 +48,7 @@ public class DevicePermissionResource extends BaseResource { public Response remove(DevicePermission entity) throws SQLException { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().unlinkDevice(entity.getUserId(), entity.getDeviceId()); - Context.getPermissionsManager().refresh(); + Context.getPermissionsManager().refreshPermissions(); if (Context.getGeofenceManager() != null) { Context.getGeofenceManager().refresh(); } -- cgit v1.2.3