aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-16 02:47:01 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-16 10:48:06 +1300
commit2bd45c3cad1d619177649c7e66e4141b99e12228 (patch)
treeb4ef39f1e946a07393083bdc898e69db81882b21 /src/org/traccar/BaseProtocolDecoder.java
parentb6af1e997c125336e2ce9f5056d9502743f22034 (diff)
downloadtrackermap-server-2bd45c3cad1d619177649c7e66e4141b99e12228.tar.gz
trackermap-server-2bd45c3cad1d619177649c7e66e4141b99e12228.tar.bz2
trackermap-server-2bd45c3cad1d619177649c7e66e4141b99e12228.zip
Refresh permissions for new devices
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 8748a9be6..e5fa76a47 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -46,7 +46,16 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
try {
Context.getDeviceManager().addDevice(device);
+
Log.info("Automatically registered device " + uniqueId);
+
+ if (defaultGroupId != 0) {
+ Context.getPermissionsManager().refreshPermissions();
+ if (Context.getGeofenceManager() != null) {
+ Context.getGeofenceManager().refresh();
+ }
+ }
+
return device.getId();
} catch (SQLException e) {
Log.warning(e);