diff --git a/Lodel/user.py b/Lodel/user.py index 2c55ed1..7e40fae 100644 --- a/Lodel/user.py +++ b/Lodel/user.py @@ -147,7 +147,7 @@ class identification_method(object): @classmethod def identify(cls, client_infos): if len(cls.__methods) == 0: - raise RuntimeError("Not identification method registered") + warnings.warn("No identification methods registered") res = False for method in cls.__methods: ret = method(client_infos) diff --git a/plugins/acl.py b/plugins/acl.py index 1d43f4e..c20ed44 100644 --- a/plugins/acl.py +++ b/plugins/acl.py @@ -9,6 +9,7 @@ class PermissionDenied(Exception): pass def check_anon(hook_name, caller, payload): if not UserContext.identity().is_identified: raise PermissionDenied("Anonymous user's are not allowed to get content") + return payload @LodelHook('leapi_update_pre') @LodelHook('leapi_delete_pre') @@ -16,3 +17,4 @@ def check_anon(hook_name, caller, payload): def check_auth(hook_name, caller, payload): if not UserContext.identity().is_authenticated: raise PermissionDenied("Only authenticated user's are allowed to do that !") + return payload