Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Morris
aurweb
Commits
da55aa64
Verified
Commit
da55aa64
authored
Oct 23, 2021
by
Kevin Morris
Browse files
fix(fastapi): use more credentials in archdev-navbar.html
Signed-off-by:
Kevin Morris
<
kevr@0cost.org
>
parent
94d49486
Pipeline
#12553
passed with stage
in 6 minutes and 37 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
templates/partials/archdev-navbar.html
View file @
da55aa64
<div
id=
"archdev-navbar"
>
<ul>
{% if request.user.is_authenticated() %}
{# Only authenticated users get Dashboard #}
<li><a
href=
"/"
>
{% trans %}Dashboard{% endtrans %}
</a></li>
{% else %}
{# Only guest users get Home #}
<li><a
href=
"/"
>
AUR {% trans %}Home{% endtrans %}
</a></li>
{% endif %}
{# All users see Packages #}
<li><a
href=
"/packages"
>
{% trans %}Packages{% endtrans %}
</a></li>
{% if request.user.is_authenticated() %}
{# All users can see Requests #}
<li>
<a
href=
"/requests"
>
{% trans %}Requests{% endtrans %}
</a>
</li>
{% if request.user.is_trusted_user() or request.user.is_developer() %}
{# Only CRED_ACCOUNT_SEARCH privileged users see Accounts #}
{% if request.user.has_credential("CRED_ACCOUNT_SEARCH") %}
<li>
<a
href=
"/accounts"
>
{% trans %}Accounts{% endtrans %}
</a>
</li>
{% endif %}
{# All users see My Account #}
<li>
<a
href=
"/account/{{ request.user.Username }}/edit"
>
{% trans %}My Account{% endtrans %}
</a>
</li>
{% if request.user.is_trusted_user() %}
{# Only CRED_TU_VOTE privileged users see Trusted User #}
{% if request.user.has_credential("CRED_TU_VOTE") %}
<li>
<a
href=
"/tu"
>
{% trans %}Trusted User{% endtrans %}
</a>
</li>
{% endif %}
{# All logged in users see Logout #}
<li>
<a
href=
"/logout?next={{ next }}"
>
{% trans %}Logout{% endtrans %}
</a>
</li>
{% else %}
{# All guest users see Register #}
<li>
<a
href=
"/register"
>
{% trans %}Register{% endtrans %}
</a>
</li>
{# All guest users see Login #}
<li>
<a
href=
"/login?next={{ next }}"
>
{% trans %}Login{% endtrans %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment