Skip to content

Commit

Permalink
Show logout link if they are logged in AND have ds_actor cookie
Browse files Browse the repository at this point in the history
Otherwise an expired cookie will still cause the logout link to show.
  • Loading branch information
simonw committed Oct 30, 2020
1 parent 18a64fb commit 561c1d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ async def menu_links():
"actor": request.actor if request else None,
"menu_links": menu_links,
"display_actor": display_actor,
"show_logout": request is not None and "ds_actor" in request.cookies,
"show_logout": request is not None and "ds_actor" in request.cookies and request.actor,
"app_css_hash": self.app_css_hash(),
"zip": zip,
"body_scripts": body_scripts,
Expand Down

0 comments on commit 561c1d2

Please sign in to comment.