Rename _schemas to _internal, closes #1156

This commit is contained in:
Simon Willison 2020-12-21 11:48:06 -08:00
commit dcdfb2c301
9 changed files with 250 additions and 259 deletions

View file

@ -13,7 +13,7 @@ def permission_allowed(datasette, actor, action, resource):
if allow is not None:
return actor_matches_allow(actor, allow)
elif action == "view-database":
if resource == "_schemas" and (actor is None or actor.get("id") != "root"):
if resource == "_internal" and (actor is None or actor.get("id") != "root"):
return False
database_allow = datasette.metadata("allow", database=resource)
if database_allow is None: