From b994602abb793c197776921bfa4b6d5b1016701b Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 9 Aug 2024 11:21:37 +0200 Subject: [PATCH] fix(templates): hide non-actionable links when not logged in A non-logged in user cannot vote/enable notifications or submit a request so hide these links. --- templates/partials/packages/actions.html | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/templates/partials/packages/actions.html b/templates/partials/packages/actions.html index 016177c7..467d3578 100644 --- a/templates/partials/packages/actions.html +++ b/templates/partials/packages/actions.html @@ -91,6 +91,44 @@ {% endif %} {% endif %} + {% if request.user.is_authenticated() %} +
  • + {% if not voted %} +
    + +
    + {% else %} +
    + +
    + {% endif %} +
  • +
  • + {% if notified %} +
    + +
    + {% else %} +
    + +
    + {% endif %} +
  • + {% endif %} {% if request.user.has_credential(creds.PKGBASE_EDIT_COMAINTAINERS, approved=[pkgbase.Maintainer]) %}