aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/BaseObjectResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-03 14:08:07 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-03 14:08:07 -0800
commit8999283ee7344fd7ec33c8a6cb5a7999e0592074 (patch)
tree7d9c69c34b04b74560fabd1a89c4a6042398613c /src/main/java/org/traccar/api/BaseObjectResource.java
parent1efe470d4df335dfaaad5a9e2c6417c24d8864e1 (diff)
downloadtrackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.gz
trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.bz2
trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.zip
Update broadcast interface
Diffstat (limited to 'src/main/java/org/traccar/api/BaseObjectResource.java')
-rw-r--r--src/main/java/org/traccar/api/BaseObjectResource.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/BaseObjectResource.java b/src/main/java/org/traccar/api/BaseObjectResource.java
index 2aaed2bb5..02e1c2cbe 100644
--- a/src/main/java/org/traccar/api/BaseObjectResource.java
+++ b/src/main/java/org/traccar/api/BaseObjectResource.java
@@ -17,6 +17,7 @@
package org.traccar.api;
import org.traccar.api.security.ServiceAccountUser;
+import org.traccar.broadcast.ObjectOperation;
import org.traccar.helper.LogAction;
import org.traccar.model.BaseModel;
import org.traccar.model.Group;
@@ -74,8 +75,8 @@ public abstract class BaseObjectResource<T extends BaseModel> extends BaseResour
if (getUserId() != ServiceAccountUser.ID) {
storage.addPermission(new Permission(User.class, getUserId(), baseClass, entity.getId()));
- cacheManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId());
- connectionManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId());
+ cacheManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId(), true);
+ connectionManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId(), true);
LogAction.link(getUserId(), User.class, getUserId(), baseClass, entity.getId());
}
@@ -110,7 +111,7 @@ public abstract class BaseObjectResource<T extends BaseModel> extends BaseResour
new Condition.Equals("id", entity.getId())));
}
}
- cacheManager.updateOrInvalidate(true, entity);
+ cacheManager.updateOrInvalidate(true, entity, ObjectOperation.UPDATE);
LogAction.edit(getUserId(), entity);
return Response.ok(entity).build();