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