mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
New plugin hook: canned_queries(), refs #852
This commit is contained in:
parent
d2f387591b
commit
6c26345836
12 changed files with 203 additions and 50 deletions
|
|
@ -70,7 +70,9 @@ class DatabaseView(DataView):
|
|||
|
||||
tables.sort(key=lambda t: (t["hidden"], t["name"]))
|
||||
canned_queries = []
|
||||
for query in self.ds.get_canned_queries(database):
|
||||
for query in (
|
||||
await self.ds.get_canned_queries(database, request.actor)
|
||||
).values():
|
||||
visible, private = await check_visibility(
|
||||
self.ds, request.actor, "view-query", (database, query["name"]),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue