1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-09 20:20:57 +00:00

imap: config parse

This commit is contained in:
Peter Bieringer 2025-01-16 06:02:06 +01:00
parent 72c7d32e44
commit 50b76f7114
2 changed files with 40 additions and 1 deletions

View file

@ -41,8 +41,16 @@ INTERNAL_TYPES: Sequence[str] = ("none", "remote_user", "http_x_remote_user",
"denyall",
"htpasswd",
"ldap",
"imap",
"dovecot")
CACHE_LOGIN_TYPES: Sequence[str] = (
"dovecot",
"ldap",
"htpasswd",
"imap",
)
AUTH_SOCKET_FAMILY: Sequence[str] = ("AF_UNIX", "AF_INET", "AF_INET6")
@ -97,7 +105,7 @@ class BaseAuth:
# cache_successful_logins
self._cache_logins = configuration.get("auth", "cache_logins")
self._type = configuration.get("auth", "type")
if (self._type in ["dovecot", "ldap", "htpasswd"]) or (self._cache_logins is False):
if (self._type in CACHE_LOGIN_TYPES) or (self._cache_logins is False):
logger.info("auth.cache_logins: %s", self._cache_logins)
else:
logger.info("auth.cache_logins: %s (but not required for type '%s' and disabled therefore)", self._cache_logins, self._type)