fix(routers.packages): restrict /pkgbase/{name}/voters to those with creds

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-12-19 14:48:40 -08:00
parent 0c07c14860
commit 22093c5c38
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 30 additions and 8 deletions

View file

@ -131,14 +131,14 @@
</tr>
<tr>
<th>{{ "Votes" | tr }}:</th>
{% if not is_maintainer %}
<td>{{ pkgbase.NumVotes }}</td>
{% else %}
{% if request.user.has_credential(creds.PKGBASE_LIST_VOTERS) %}
<td>
<a href="/pkgbase/{{ pkgbase.Name }}/voters">
{{ pkgbase.NumVotes }}
</a>
</td>
{% else %}
<td>{{ pkgbase.NumVotes }}</td>
{% endif %}
</tr>
<tr>