Skip to content

Commit

Permalink
Fix for todomvc permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 2, 2022
1 parent 27efa8c commit d7e5e3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/plugins/my_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ def permission_allowed(actor, action):
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 (
actor_id = None
if actor:
actor_id = actor.get("id")
if actor_id == "todomvc" and action in (
"insert-row",
"create-table",
"drop-table",
Expand Down

0 comments on commit d7e5e3c

Please sign in to comment.