Explorar o código

log also in case of "denyall" is selected, cosmetics

Peter Bieringer hai 1 ano
pai
achega
bf112d6b5f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      radicale/auth/__init__.py

+ 3 - 1
radicale/auth/__init__.py

@@ -42,7 +42,9 @@ INTERNAL_TYPES: Sequence[str] = ("none", "remote_user", "http_x_remote_user",
 def load(configuration: "config.Configuration") -> "BaseAuth":
     """Load the authentication module chosen in configuration."""
     if configuration.get("auth", "type") == "none":
-        logger.warn("No user authentication is selected (insecure)")
+        logger.warn("No user authentication is selected: '[auth] type=none' (insecure)")
+    if configuration.get("auth", "type") == "denyall":
+        logger.warn("All access is blocked by: '[auth] type=denyall'")
     return utils.load_plugin(INTERNAL_TYPES, "auth", "Auth", BaseAuth,
                              configuration)