mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for todomvc permission check
Refs https://github.com/simonw/todomvc-datasette/issues/2
This commit is contained in:
parent
27efa8c381
commit
d7e5e3c9f9
1 changed files with 4 additions and 1 deletions
|
|
@ -217,7 +217,10 @@ def permission_allowed(actor, action):
|
||||||
return actor.get("can_download") if actor else None
|
return actor.get("can_download") if actor else None
|
||||||
# Special permissions for latest.datasette.io demos
|
# Special permissions for latest.datasette.io demos
|
||||||
# See https://github.com/simonw/todomvc-datasette/issues/2
|
# See https://github.com/simonw/todomvc-datasette/issues/2
|
||||||
if actor == "todomvc" and action in (
|
actor_id = None
|
||||||
|
if actor:
|
||||||
|
actor_id = actor.get("id")
|
||||||
|
if actor_id == "todomvc" and action in (
|
||||||
"insert-row",
|
"insert-row",
|
||||||
"create-table",
|
"create-table",
|
||||||
"drop-table",
|
"drop-table",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue