mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(FastAPI): depend on auth_required redirect for pkgbase actions
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
8bc1fab74d
commit
dc11a88ed3
1 changed files with 51 additions and 82 deletions
|
@ -23,35 +23,6 @@
|
||||||
{{ "Search wiki" | tr }}
|
{{ "Search wiki" | tr }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if not request.user.is_authenticated() %}
|
|
||||||
{% if not out_of_date %}
|
|
||||||
<li>
|
|
||||||
<a href="/pkgbase/{{ result.Name }}/flag/">
|
|
||||||
{{ "Flag package out-of-date" | tr }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li>
|
|
||||||
<span class="flagged">
|
|
||||||
{% set ood_ts = result.OutOfDateTS | dt | as_timezone(timezone) %}
|
|
||||||
{{
|
|
||||||
"Flagged out-of-date (%s)"
|
|
||||||
| tr | format(ood_ts.strftime("%Y-%m-%d"))
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li>
|
|
||||||
<a href="/login?next={{ request.url.path | quote_plus }}">
|
|
||||||
{{ "Vote for this package" | tr }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="/login?next={{ request.url.path | quote_plus }}">
|
|
||||||
{{ "Enable notifications" | tr }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
{% if not out_of_date %}
|
{% if not out_of_date %}
|
||||||
<li>
|
<li>
|
||||||
<a href="/pkgbase/{{ result.Name }}/flag/">
|
<a href="/pkgbase/{{ result.Name }}/flag/">
|
||||||
|
@ -114,8 +85,6 @@
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
</form>
|
||||||
{% if request.user.has_credential('CRED_PKGBASE_EDIT_COMAINTAINERS', approved=[pkgbase.Maintainer]) %}
|
{% if request.user.has_credential('CRED_PKGBASE_EDIT_COMAINTAINERS', approved=[pkgbase.Maintainer]) %}
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Add table
Reference in a new issue