only show Voting Activity link if logged in

This commit is contained in:
rimu 2024-09-24 09:08:54 +12:00
parent db250b6aeb
commit 705de82714
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@
{% endif -%} {% endif -%}
<li><a href="{{ url_for('post.post_report', post_id=post.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-report"></span> <li><a href="{{ url_for('post.post_report', post_id=post.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-report"></span>
{{ _('Report to moderators') }}</a></li> {{ _('Report to moderators') }}</a></li>
{% if post.community.is_moderator() or post.community.is_owner() or current_user.is_admin() -%} {% if current_user.is_authenticated and (post.community.is_moderator() or post.community.is_owner() or current_user.is_admin()) -%}
<li><a href="{{ url_for('post.post_view_voting_activity', post_id=post.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-sticky-left"></span> <li><a href="{{ url_for('post.post_view_voting_activity', post_id=post.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-sticky-left"></span>
{{ _('View Voting Activity') }}</a></li> {{ _('View Voting Activity') }}</a></li>
{% endif -%} {% endif -%}

View file

@ -41,7 +41,7 @@
{{ _("Hide every post from author's instance: %(name)s", name=post_reply.instance.domain) }}</a></li> {{ _("Hide every post from author's instance: %(name)s", name=post_reply.instance.domain) }}</a></li>
{% endif -%} {% endif -%}
{% endif -%} {% endif -%}
{% if post_reply.community.is_moderator() or post_reply.community.is_owner() or current_user.is_admin() -%} {% if current_user.is_authenticated and (post_reply.community.is_moderator() or post_reply.community.is_owner() or current_user.is_admin()) -%}
<li><a href="{{ url_for('post.post_reply_view_voting_activity', comment_id=post_reply.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-sticky-left"></span> <li><a href="{{ url_for('post.post_reply_view_voting_activity', comment_id=post_reply.id) }}" class="no-underline" rel="nofollow"><span class="fe fe-sticky-left"></span>
{{ _('View Voting Activity') }}</a></li> {{ _('View Voting Activity') }}</a></li>
{% endif -%} {% endif -%}