fix(fastapi): hide keywords when there are none or they can't be edited

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-11 18:13:21 -08:00
parent 363afff332
commit 20f5519b99
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -33,6 +33,7 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% if pkgbase.keywords.count() or request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
<tr> <tr>
<th>{{ "Keywords" | tr }}:</th> <th>{{ "Keywords" | tr }}:</th>
{% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %} {% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
@ -61,6 +62,7 @@
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
{% endif %}
{% if licenses and licenses.count() and show_package_details %} {% if licenses and licenses.count() and show_package_details %}
<tr> <tr>
<th>{{ "Licenses" | tr }}:</th> <th>{{ "Licenses" | tr }}:</th>