Implemented actor_from_request with tests, refs #699

Also added datasette argument to permission_allowed hook
This commit is contained in:
Simon Willison 2020-05-30 15:06:33 -07:00
commit 461c82838d
6 changed files with 80 additions and 2 deletions

View file

@ -66,5 +66,5 @@ def actor_from_request(datasette, request):
@hookspec
def permission_allowed(actor, action, resource_type, resource_identifier):
def permission_allowed(datasette, actor, action, resource_type, resource_identifier):
"Check if actor is allowed to perfom this action - return True, False or None"