From 561c1d2d36a89675764e4410a2a127323402eaa3 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 29 Oct 2020 20:51:37 -0700 Subject: [PATCH] Show logout link if they are logged in AND have ds_actor cookie Otherwise an expired cookie will still cause the logout link to show. --- datasette/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/app.py b/datasette/app.py index fb5c34a4..efe5a812 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -767,7 +767,7 @@ class Datasette: "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,