Initial attempt at /db/table/row/-/delete, refs #1864

This commit is contained in:
Simon Willison 2022-10-30 16:16:00 -07:00
commit 00632ded30
6 changed files with 144 additions and 4 deletions

View file

@ -9,7 +9,13 @@ import time
@hookimpl(tryfirst=True)
def permission_allowed(datasette, actor, action, resource):
async def inner():
if action in ("permissions-debug", "debug-menu", "insert-row", "drop-table"):
if action in (
"permissions-debug",
"debug-menu",
"insert-row",
"drop-table",
"delete-row",
):
if actor and actor.get("id") == "root":
return True
elif action == "view-instance":