aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/NotificationManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-04-11 14:55:11 +0500
committerAbyss777 <abyss@fox5.ru>2018-04-11 14:55:31 +0500
commitf7a4d1977e71797b231ebb9a55308fee7c2b64d7 (patch)
tree3b879aed22d40ebe405a792f7bdd3446d7b38aaa /src/org/traccar/database/NotificationManager.java
parentbb071de84dd000ec3067991bb523fe5ef24b76e9 (diff)
downloadtrackermap-server-f7a4d1977e71797b231ebb9a55308fee7c2b64d7.tar.gz
trackermap-server-f7a4d1977e71797b231ebb9a55308fee7c2b64d7.tar.bz2
trackermap-server-f7a4d1977e71797b231ebb9a55308fee7c2b64d7.zip
Add support of multiple Maintenances
Diffstat (limited to 'src/org/traccar/database/NotificationManager.java')
-rw-r--r--src/org/traccar/database/NotificationManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java
index 1c59a8666..9f2606f7f 100644
--- a/src/org/traccar/database/NotificationManager.java
+++ b/src/org/traccar/database/NotificationManager.java
@@ -78,8 +78,10 @@ public class NotificationManager extends ExtendedObjectManager<Notification> {
usersToForward = new HashSet<>();
}
for (long userId : users) {
- if (event.getGeofenceId() == 0 || Context.getGeofenceManager() != null
- && Context.getGeofenceManager().checkItemPermission(userId, event.getGeofenceId())) {
+ if ((event.getGeofenceId() == 0 || Context.getGeofenceManager() != null
+ && Context.getGeofenceManager().checkItemPermission(userId, event.getGeofenceId()))
+ && (event.getMaintenanceId() == 0
+ || Context.getMaintenancesManager().checkItemPermission(userId, event.getMaintenanceId()))) {
if (usersToForward != null) {
usersToForward.add(userId);
}