mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
In-memory _schemas database tracking schemas of attached tables, closes #1150
This commit is contained in:
parent
5e9895c67f
commit
ebc7aa287c
8 changed files with 279 additions and 6 deletions
|
|
@ -13,6 +13,8 @@ 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"):
|
||||
return False
|
||||
database_allow = datasette.metadata("allow", database=resource)
|
||||
if database_allow is None:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue