Improved permissions UI WIP

This commit is contained in:
Simon Willison 2025-10-26 16:53:49 -07:00
commit 73014abe8b
12 changed files with 417 additions and 335 deletions

View file

@ -835,8 +835,14 @@ async def test_versions_json(ds_client):
@pytest.mark.asyncio
async def test_actions_json(ds_client):
response = await ds_client.get("/-/actions.json")
data = response.json()
original_root_enabled = ds_client.ds.root_enabled
try:
ds_client.ds.root_enabled = True
cookies = {"ds_actor": ds_client.actor_cookie({"id": "root"})}
response = await ds_client.get("/-/actions.json", cookies=cookies)
data = response.json()
finally:
ds_client.ds.root_enabled = original_root_enabled
assert isinstance(data, list)
assert len(data) > 0
# Check structure of first action