mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Only show 'log out' if ds_cookie present, closes #884
This commit is contained in:
parent
f7c3fc978c
commit
1bae24691f
3 changed files with 11 additions and 2 deletions
|
|
@ -92,3 +92,11 @@ def test_logout_button_in_navigation(app_client, path):
|
|||
):
|
||||
assert fragment in response.text
|
||||
assert fragment not in anon_response.text
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path", ["/", "/fixtures", "/fixtures/facetable"])
|
||||
def test_no_logout_button_in_navigation_if_no_ds_actor_cookie(app_client, path):
|
||||
response = app_client.get(path + "?_bot=1")
|
||||
assert "<strong>bot</strong>" in response.text
|
||||
assert "<strong>bot</strong> ·" not in response.text
|
||||
assert '<form action="/-/logout" method="post">' not in response.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue