mirror of
https://github.com/simonw/datasette.git
synced 2026-09-24 19:04:08 +02:00
Limit derived-table permissions to one source hop
Simplify the solution to 5de0c1724e - avoid contextvar.
This commit is contained in:
parent
f70edbfa60
commit
92c7d4b608
9 changed files with 235 additions and 64 deletions
|
|
@ -36,8 +36,10 @@ def test_homepage(app_client_two_attached_databases):
|
|||
h2 = soup.select("h2")[0]
|
||||
assert "extra database" == h2.text.strip()
|
||||
counts_p, links_p = h2.find_all_next("p")[:2]
|
||||
# Shadow tables of the external-content index are denied, so they do not
|
||||
# contribute to the table or row totals.
|
||||
assert (
|
||||
"2 rows in 1 table, 5 rows in 4 hidden tables, 1 view" == counts_p.text.strip()
|
||||
"2 rows in 1 table, 2 rows in 1 hidden table, 1 view" == counts_p.text.strip()
|
||||
)
|
||||
# We should only show visible, not hidden tables here:
|
||||
table_links = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue