From 6b281e17262f481415985b5f4b482a6e4b7953a6 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 16 Aug 2018 08:00:01 +0200 Subject: [PATCH] Move `realm` config from `server` to `auth` --- config | 6 +++--- radicale/__init__.py | 2 +- radicale/config.py | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config b/config index 990aa62..43a9254 100644 --- a/config +++ b/config @@ -48,9 +48,6 @@ # Reverse DNS to resolve client address in logs #dns_lookup = True -# Message displayed in the client when a password is needed -#realm = Radicale - Password Required - [encoding] @@ -79,6 +76,9 @@ # Incorrect authentication delay (seconds) #delay = 1 +# Message displayed in the client when a password is needed +#realm = Radicale - Password Required + [rights] diff --git a/radicale/__init__.py b/radicale/__init__.py index d9b4500..dd69d25 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -355,7 +355,7 @@ class Application: # Unknown or unauthorized user logger.debug("Asking client for authentication") status = client.UNAUTHORIZED - realm = self.configuration.get("server", "realm") + realm = self.configuration.get("auth", "realm") headers = dict(headers) headers.update({ "WWW-Authenticate": diff --git a/radicale/config.py b/radicale/config.py index fa911fd..fd3b208 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -101,11 +101,7 @@ INITIAL_CONFIG = OrderedDict([ ("dns_lookup", { "value": "True", "help": "use reverse DNS to resolve client address in logs", - "type": bool}), - ("realm", { - "value": "Radicale - Password Required", - "help": "message displayed when a password is needed", - "type": str})])), + "type": bool})])), ("encoding", OrderedDict([ ("request", { "value": "utf-8", @@ -129,6 +125,10 @@ INITIAL_CONFIG = OrderedDict([ "value": "bcrypt", "help": "htpasswd encryption method", "type": str}), + ("realm", { + "value": "Radicale - Password Required", + "help": "message displayed when a password is needed", + "type": str}), ("delay", { "value": "1", "help": "incorrect authentication delay",