aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-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;
+ }
}