From 27a6563302cd18823315222d74394a74387ae2f2 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 15 Oct 2021 19:11:15 -0700 Subject: [PATCH] fix(FastAPI): use CRED_PKGBASE_SET_KEYWORDS credential properly Signed-off-by: Kevin Morris --- templates/partials/packages/details.html | 56 ++++++++++++------------ 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/templates/partials/packages/details.html b/templates/partials/packages/details.html index 83c6d53b..05dc82c6 100644 --- a/templates/partials/packages/details.html +++ b/templates/partials/packages/details.html @@ -33,36 +33,34 @@ {% endif %} - {% if pkgbase.keywords.scalar() %} - - {{ "Keywords" | tr }}: - {% if is_maintainer %} - -
+ {{ "Keywords" | tr }}: + {% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %} + + +
+ + +
+
+ + {% else %} + + {% for keyword in pkgbase.keywords %} + -
- - -
- - - {% else %} - - {% for keyword in pkgbase.keywords %} -
- {{ keyword.Keyword }} - - {% endfor %} - - {% endif %} - - {% endif %} + {{ keyword.Keyword }} + + {% endfor %} + + {% endif %} + {% if licenses and licenses.scalar() and show_package_details %} {{ "Licenses" | tr }}: