mirror of
https://github.com/simonw/datasette.git
synced 2026-07-09 09:04:42 +02:00
Require permissions-debug for /-/threads
/-/threads exposes runtime internals - thread idents and asyncio task reprs including file paths - but only required view-instance. It now requires permissions-debug, like /-/actions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
parent
0bf3a54716
commit
e5e9aca871
8 changed files with 30 additions and 14 deletions
|
|
@ -525,7 +525,11 @@ def test_databases_json(app_client_two_attached_databases_one_immutable):
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_threads_json(ds_client):
|
||||
response = await ds_client.get("/-/threads.json")
|
||||
ds_client.ds.root_enabled = True
|
||||
try:
|
||||
response = await ds_client.get("/-/threads.json", actor={"id": "root"})
|
||||
finally:
|
||||
ds_client.ds.root_enabled = False
|
||||
expected_keys = {"ok", "threads", "num_threads"}
|
||||
if sys.version_info >= (3, 7, 0):
|
||||
expected_keys.update({"tasks", "num_tasks"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue