We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b52a7e3 commit 2298bfbCopy full SHA for 2298bfb
backend/open_webui/routers/auths.py
@@ -34,6 +34,7 @@
34
from open_webui.config import (
35
OPENID_PROVIDER_URL,
36
ENABLE_OAUTH_SIGNUP,
37
+ ENABLE_LDAP
38
)
39
from pydantic import BaseModel
40
from open_webui.utils.misc import parse_duration, validate_email_format
@@ -51,8 +52,10 @@
51
52
from typing import Optional, List
53
54
from ssl import CERT_REQUIRED, PROTOCOL_TLS
-from ldap3 import Server, Connection, NONE, Tls
55
-from ldap3.utils.conv import escape_filter_chars
+
56
+if ENABLE_LDAP.value:
57
+ from ldap3 import Server, Connection, NONE, Tls
58
+ from ldap3.utils.conv import escape_filter_chars
59
60
router = APIRouter()
61
0 commit comments