Rename backends from None to none
All other backend names are lower case.
This commit is contained in:
parent
edaf21561d
commit
eba6621f17
6
config
6
config
@ -66,8 +66,8 @@
|
||||
[auth]
|
||||
|
||||
# Authentication method
|
||||
# Value: None | htpasswd | remote_user | http_x_remote_user
|
||||
#type = None
|
||||
# Value: none | htpasswd | remote_user | http_x_remote_user
|
||||
#type = none
|
||||
|
||||
# Htpasswd filename
|
||||
#htpasswd_filename = /etc/radicale/users
|
||||
@ -85,7 +85,7 @@
|
||||
[rights]
|
||||
|
||||
# Rights backend
|
||||
# Value: None | authenticated | owner_only | owner_write | from_file
|
||||
# Value: none | authenticated | owner_only | owner_write | from_file
|
||||
#type = owner_only
|
||||
|
||||
# File for rights management from_file
|
||||
|
@ -64,7 +64,7 @@ from importlib import import_module
|
||||
def load(configuration, logger):
|
||||
"""Load the authentication manager chosen in configuration."""
|
||||
auth_type = configuration.get("auth", "type")
|
||||
if auth_type == "None":
|
||||
if auth_type in ("None", "none"): # DEPRECATED: use "none"
|
||||
class_ = NoneAuth
|
||||
elif auth_type == "remote_user":
|
||||
class_ = RemoteUserAuth
|
||||
|
@ -48,9 +48,9 @@ from . import storage
|
||||
def load(configuration, logger):
|
||||
"""Load the rights manager chosen in configuration."""
|
||||
rights_type = configuration.get("rights", "type")
|
||||
if configuration.get("auth", "type") == "None":
|
||||
if configuration.get("auth", "type") in ("None", "none"): # DEPRECATED
|
||||
rights_type = "None"
|
||||
if rights_type == "None":
|
||||
if rights_type in ("None", "none"): # DEPRECATED: use "none"
|
||||
rights_class = NoneRights
|
||||
elif rights_type == "authenticated":
|
||||
rights_class = AuthenticatedRights
|
||||
|
@ -102,16 +102,16 @@ class TestBaseAuthRequests(BaseTest):
|
||||
self._test_rights("authenticated", "tmp", "/other", "w", 207)
|
||||
|
||||
def test_none(self):
|
||||
self._test_rights("None", "", "/", "r", 207)
|
||||
self._test_rights("None", "", "/", "w", 207)
|
||||
self._test_rights("None", "", "/tmp", "r", 207)
|
||||
self._test_rights("None", "", "/tmp", "w", 207)
|
||||
self._test_rights("None", "tmp", "/", "r", 207)
|
||||
self._test_rights("None", "tmp", "/", "w", 207)
|
||||
self._test_rights("None", "tmp", "/tmp", "r", 207)
|
||||
self._test_rights("None", "tmp", "/tmp", "w", 207)
|
||||
self._test_rights("None", "tmp", "/other", "r", 207)
|
||||
self._test_rights("None", "tmp", "/other", "w", 207)
|
||||
self._test_rights("none", "", "/", "r", 207)
|
||||
self._test_rights("none", "", "/", "w", 207)
|
||||
self._test_rights("none", "", "/tmp", "r", 207)
|
||||
self._test_rights("none", "", "/tmp", "w", 207)
|
||||
self._test_rights("none", "tmp", "/", "r", 207)
|
||||
self._test_rights("none", "tmp", "/", "w", 207)
|
||||
self._test_rights("none", "tmp", "/tmp", "r", 207)
|
||||
self._test_rights("none", "tmp", "/tmp", "w", 207)
|
||||
self._test_rights("none", "tmp", "/other", "r", 207)
|
||||
self._test_rights("none", "tmp", "/other", "w", 207)
|
||||
|
||||
def test_from_file(self):
|
||||
rights_file_path = os.path.join(self.colpath, "rights")
|
||||
|
Loading…
Reference in New Issue
Block a user