Cascading permissions for .db download, closes #1058

This commit is contained in:
Simon Willison 2020-10-27 20:15:41 -07:00
commit 7d9fedc176
3 changed files with 20 additions and 5 deletions

View file

@ -193,6 +193,8 @@ def permission_allowed(actor, action):
return True
elif action == "this_is_denied":
return False
elif action == "view-database-download":
return (actor and actor.get("can_download")) or None
@hookimpl