From b19f1a505f7088ff48f467b32b5f1c207aa3be01 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 12 Jul 2017 14:22:03 +0500 Subject: - Handle rfid attributes and populate driverUniqueId - Add Driver Name to Trip report --- src/org/traccar/database/DriversManager.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/org/traccar/database') 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; + } } -- cgit v1.2.3