aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index a4fc5b679..47472b1d4 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -38,6 +38,7 @@ import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
import org.traccar.database.GeofenceManager;
import org.traccar.database.StatisticsManager;
+import org.traccar.database.UsersManager;
import org.traccar.geocoder.BingMapsGeocoder;
import org.traccar.geocoder.FactualGeocoder;
import org.traccar.geocoder.GeocodeFarmGeocoder;
@@ -98,6 +99,12 @@ public final class Context {
return mediaManager;
}
+ private static UsersManager usersManager;
+
+ public static UsersManager getUsersManager() {
+ return usersManager;
+ }
+
private static DeviceManager deviceManager;
public static DeviceManager getDeviceManager() {
@@ -233,6 +240,10 @@ public final class Context {
}
if (dataManager != null) {
+ usersManager = new UsersManager(dataManager);
+ }
+
+ if (dataManager != null) {
deviceManager = new DeviceManager(dataManager);
}
@@ -298,7 +309,7 @@ public final class Context {
webServer = new WebServer(config, dataManager.getDataSource());
}
- permissionsManager = new PermissionsManager(dataManager);
+ permissionsManager = new PermissionsManager(dataManager, usersManager);
connectionManager = new ConnectionManager();