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.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 237da40c8..9a48b2740 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -34,6 +34,7 @@ import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.DriversManager;
import org.traccar.database.IdentityManager;
+import org.traccar.database.LdapProvider;
import org.traccar.database.MediaManager;
import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
@@ -109,6 +110,12 @@ public final class Context {
return dataManager;
}
+ private static LdapProvider ldapProvider;
+
+ public static LdapProvider getLdapProvider() {
+ return ldapProvider;
+ }
+
private static MediaManager mediaManager;
public static MediaManager getMediaManager() {
@@ -321,6 +328,10 @@ public final class Context {
dataManager = new DataManager(config);
}
+ if (config.getBoolean("ldap.enable")) {
+ ldapProvider = new LdapProvider(config.getString("ldap.url"), config.getString("ldap.context"));
+ }
+
if (config.hasKey("media.path")) {
mediaManager = new MediaManager(config);
}