mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Refactor breadcrumbs to respect permissions, refs #1831
This commit is contained in:
parent
b7fec7f902
commit
1a5e5f2aa9
13 changed files with 65 additions and 59 deletions
|
|
@ -333,6 +333,7 @@ def test_permissions_debug(app_client):
|
|||
{"action": "permissions-debug", "result": True, "used_default": False},
|
||||
{"action": "view-instance", "result": None, "used_default": True},
|
||||
{"action": "debug-menu", "result": False, "used_default": True},
|
||||
{"action": "view-instance", "result": True, "used_default": True},
|
||||
{"action": "permissions-debug", "result": False, "used_default": True},
|
||||
{"action": "view-instance", "result": None, "used_default": True},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ def test_hook_menu_links(app_client):
|
|||
def get_menu_links(html):
|
||||
soup = Soup(html, "html.parser")
|
||||
return [
|
||||
{"label": a.text, "href": a["href"]} for a in soup.find("nav").select("a")
|
||||
{"label": a.text, "href": a["href"]} for a in soup.select(".nav-menu a")
|
||||
]
|
||||
|
||||
response = app_client.get("/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue