mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
🚸 — Use ReconnectLDAPObject
This commit is contained in:
parent
9389e3a005
commit
0a02855e60
2 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- 🚸 — Use ReconnectLDAPObject
|
||||
|
||||
## 0.9.0
|
||||
|
||||
Date: 2025-02-18
|
||||
|
|
|
@ -40,7 +40,9 @@ def get_application() -> FastAPI:
|
|||
if config.general.ldap is not None:
|
||||
import ldap
|
||||
|
||||
appli.state.ldap = ldap.initialize(config.general.ldap.uri)
|
||||
appli.state.ldap = ldap.ldapobject.ReconnectLDAPObject(
|
||||
config.general.ldap.uri, retry_max=5, retry_delay=5
|
||||
)
|
||||
|
||||
@appli.state.manager.user_loader()
|
||||
async def query_user(user: str) -> None | str | models.User:
|
||||
|
|
Loading…
Reference in a new issue