mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
actor_from_request and permission_allowed hookspecs, refs #699
This commit is contained in:
parent
c4fbe50676
commit
060a56735c
2 changed files with 47 additions and 0 deletions
|
|
@ -58,3 +58,13 @@ def register_output_renderer(datasette):
|
|||
@hookspec
|
||||
def register_facet_classes():
|
||||
"Register Facet subclasses"
|
||||
|
||||
|
||||
@hookspec
|
||||
def actor_from_request(datasette, request):
|
||||
"Return an actor dictionary based on the incoming request"
|
||||
|
||||
|
||||
@hookspec
|
||||
def permission_allowed(actor, action, resource_type, resource_identifier):
|
||||
"Check if actor is allowed to perfom this action - return True, False or None"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue