mirror of
https://github.com/simonw/datasette.git
synced 2026-09-21 16:04:07 +02:00
Check effective table visibility for through filters
This commit is contained in:
parent
d918c18bb2
commit
375f9f0322
1 changed files with 8 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue