aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DriversManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-12 14:22:03 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-12 15:20:07 +0500
commitb19f1a505f7088ff48f467b32b5f1c207aa3be01 (patch)
tree663ef14ec15af04e5d9062c2185cd020fb5b9e42 /src/org/traccar/database/DriversManager.java
parent4f3830d844dd0542e9e7b09e7a6c17ffbb796264 (diff)
downloadtrackermap-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.tar.gz
trackermap-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.tar.bz2
trackermap-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.zip
- Handle rfid attributes and populate driverUniqueId
- Add Driver Name to Trip report
Diffstat (limited to 'src/org/traccar/database/DriversManager.java')
-rw-r--r--src/org/traccar/database/DriversManager.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/database/DriversManager.java b/src/org/traccar/database/DriversManager.java
index e89d59311..1744936e3 100644
--- a/src/org/traccar/database/DriversManager.java
+++ b/src/org/traccar/database/DriversManager.java
@@ -210,4 +210,16 @@ public class DriversManager {
}
return drivers;
}
+
+ public final boolean authorizeDriverByUniqueId(String driverUniqueId, long deviceId) {
+ if (driversByUniqueId.containsKey(driverUniqueId)) {
+ long chekingDriverId = getDriverByUniqueId(driverUniqueId).getId();
+ for (long driverId : getAllDeviceDrivers(deviceId)) {
+ if (chekingDriverId == driverId) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}