From b6b7aad04610dc47d888cc9cb5c6429928761fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 5 Sep 2017 11:35:13 +0200 Subject: [PATCH] Have a nicer 403 Forbidden message when the user isn't logged in. Since we don't know who the user is, just stating that they don't have access isn't correct. --- src/templates/errors/403_embed.pug | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/templates/errors/403_embed.pug b/src/templates/errors/403_embed.pug index a9e55a72..0a54cece 100644 --- a/src/templates/errors/403_embed.pug +++ b/src/templates/errors/403_embed.pug @@ -4,7 +4,12 @@ .error-top-container .error-title Forbidden. .error-lead + | {% if current_user.is_authenticated %} p You don't have access to this content. + | {% else %} + p You don't have access to this content. Or maybe you do once you log in. + | {% endif %} + | {% if current_user.is_authenticated %} | {% if current_user.has_role('demo') %}