diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-25 10:53:08 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-25 11:00:06 +0500 |
commit | 68af658ea2ff9593e5be7a2b2cfcb75c744fd749 (patch) | |
tree | e40066f50ead2270bda27fd9ce2cbf4a702c09fd /src/org/traccar/Context.java | |
parent | 6253fa291c3a2962fef2076c0cbb0f4e1ca8a3b4 (diff) | |
download | trackermap-server-68af658ea2ff9593e5be7a2b2cfcb75c744fd749.tar.gz trackermap-server-68af658ea2ff9593e5be7a2b2cfcb75c744fd749.tar.bz2 trackermap-server-68af658ea2ff9593e5be7a2b2cfcb75c744fd749.zip |
Move users management to separate manager
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 13 |
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(); |