|
@@ -9,6 +9,7 @@ class PermissionDenied(Exception): pass
|
9
|
9
|
def check_anon(hook_name, caller, payload):
|
10
|
10
|
if not UserContext.identity().is_identified:
|
11
|
11
|
raise PermissionDenied("Anonymous user's are not allowed to get content")
|
|
12
|
+ return payload
|
12
|
13
|
|
13
|
14
|
@LodelHook('leapi_update_pre')
|
14
|
15
|
@LodelHook('leapi_delete_pre')
|
|
@@ -16,3 +17,4 @@ def check_anon(hook_name, caller, payload):
|
16
|
17
|
def check_auth(hook_name, caller, payload):
|
17
|
18
|
if not UserContext.identity().is_authenticated:
|
18
|
19
|
raise PermissionDenied("Only authenticated user's are allowed to do that !")
|
|
20
|
+ return payload
|