Don't set rights management when no authentication is set
This commit is contained in:
parent
8cc15a3d25
commit
b47505d5bd
@ -48,8 +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."""
|
||||||
|
auth_type = configuration.get("auth", "type")
|
||||||
rights_type = configuration.get("rights", "type")
|
rights_type = configuration.get("rights", "type")
|
||||||
if rights_type == "None":
|
if auth_type == "None" or rights_type == "None":
|
||||||
return lambda user, collection, permission: True
|
return lambda user, collection, permission: True
|
||||||
elif rights_type in DEFINED_RIGHTS or rights_type == "from_file":
|
elif rights_type in DEFINED_RIGHTS or rights_type == "from_file":
|
||||||
return Rights(configuration, logger).authorized
|
return Rights(configuration, logger).authorized
|
||||||
|
Loading…
Reference in New Issue
Block a user