Rename backends from None to none
All other backend names are lower case.
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user