mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
allow_signed_tokens setting, closes #1856
This commit is contained in:
parent
0f013ff497
commit
c23fa850e7
8 changed files with 48 additions and 5 deletions
|
|
@ -52,6 +52,8 @@ def permission_allowed(datasette, actor, action, resource):
|
|||
@hookimpl
|
||||
def actor_from_request(datasette, request):
|
||||
prefix = "dstok_"
|
||||
if not datasette.setting("allow_signed_tokens"):
|
||||
return None
|
||||
authorization = request.headers.get("authorization")
|
||||
if not authorization:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue