aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-26 19:42:32 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-26 19:42:32 +1200
commit86d96506f51fc4c49af0487e00ecd2d5ee02218c (patch)
treec5d639518b6c6fc77a3db94fd9cd81c6778cb0bb /src/org/traccar/database
parent88c87b2ce54733c06db810e51a749797ba03e913 (diff)
downloadtrackermap-server-86d96506f51fc4c49af0487e00ecd2d5ee02218c.tar.gz
trackermap-server-86d96506f51fc4c49af0487e00ecd2d5ee02218c.tar.bz2
trackermap-server-86d96506f51fc4c49af0487e00ecd2d5ee02218c.zip
Implement session updates
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/DataManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index e2478ecd6..92f19b903 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -35,6 +35,7 @@ import javax.sql.DataSource;
import org.traccar.Context;
import org.traccar.helper.DriverDelegate;
import org.traccar.helper.Log;
+import org.traccar.http.AsyncServlet;
import org.traccar.http.JsonConverter;
import org.traccar.model.Device;
import org.traccar.model.Permission;
@@ -283,6 +284,8 @@ public class DataManager {
QueryBuilder.create(dataSource, getQuery("database.deleteDevice"))
.setObject(device)
.executeUpdate();
+ Context.getPermissionsManager().refresh();
+ AsyncServlet.sessionRefreshDevice(device.getId());
}
public void linkDevice(long userId, long deviceId) throws SQLException {
@@ -291,6 +294,7 @@ public class DataManager {
.setLong("deviceId", deviceId)
.executeUpdate();
Context.getPermissionsManager().refresh();
+ AsyncServlet.sessionRefreshUser(userId);
}
public Collection<Position> getPositions(long userId, long deviceId, Date from, Date to) throws SQLException {