Check effective table visibility for through filters

This commit is contained in:
Simon Willison 2026-09-10 16:10:18 -07:00
commit 375f9f0322

View file

@ -133,6 +133,14 @@ def through_filters(request, database, table, datasette):
through_table = through_data["table"]
other_column = through_data["column"]
value = through_data["value"]
await datasette.ensure_permissions(
request.actor,
[
("view-table", (database, through_table)),
("view-database", database),
"view-instance",
],
)
db = datasette.get_database(database)
outgoing_foreign_keys = await db.foreign_keys_for_table(through_table)
try: