aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/DevicePermissionResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-24 14:55:06 +1200
committerGitHub <noreply@github.com>2016-08-24 14:55:06 +1200
commitea0bdea88003f46fd6f6164d5c45e33d53f47c81 (patch)
treed8e51a10e56f7e916cc2bf7486d75c90feb5696e /src/org/traccar/api/resource/DevicePermissionResource.java
parenta645eb8e2338f11e2c807045b1787a47cd1f1464 (diff)
parentf6484e9808f50aa997f028f9421b05aad6aed8bd (diff)
downloadtrackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.gz
trackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.bz2
trackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.zip
Merge pull request #2242 from Abyss777/users_cache
Implement users cache
Diffstat (limited to 'src/org/traccar/api/resource/DevicePermissionResource.java')
-rw-r--r--src/org/traccar/api/resource/DevicePermissionResource.java4
1 files changed, 2 insertions, 2 deletions
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();
}