mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
todomvc permissions and fixed DATASETTE_SECRET for new demo
Refs https://github.com/simonw/todomvc-datasette/issues/2
This commit is contained in:
parent
03f247845e
commit
27efa8c381
2 changed files with 15 additions and 2 deletions
|
|
@ -215,6 +215,16 @@ def permission_allowed(actor, action):
|
|||
return False
|
||||
elif action == "view-database-download":
|
||||
return actor.get("can_download") if actor else None
|
||||
# Special permissions for latest.datasette.io demos
|
||||
# See https://github.com/simonw/todomvc-datasette/issues/2
|
||||
if actor == "todomvc" and action in (
|
||||
"insert-row",
|
||||
"create-table",
|
||||
"drop-table",
|
||||
"delete-row",
|
||||
"update-row",
|
||||
):
|
||||
return True
|
||||
|
||||
|
||||
@hookimpl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue