Browse Source

Don't show View Markdown for logged-out users

merge-requests/110/head
Deimos 5 years ago
parent
commit
4371f9cef6
  1. 2
      tildes/tildes/templates/macros/comments.jinja2
  2. 1
      tildes/tildes/templates/topic.jinja2

2
tildes/tildes/templates/macros/comments.jinja2

@ -198,7 +198,7 @@
{% endif %}
{# Don't show the "View Markdown" button (or dropdown) if the user can edit #}
{% if not request.has_permission("edit", comment) %}
{% if request.user and not request.has_permission("edit", comment) %}
<li>
<div class="dropdown dropdown-right">
<button class="btn-post-action dropdown-toggle">

1
tildes/tildes/templates/topic.jinja2

@ -184,6 +184,7 @@
{# Only show "View Markdown" (and dropdown) when it's a text topic and the user is
allowed to view the content, but can't edit it #}
{% if topic.is_text_type
and request.user
and request.has_permission("view_content", topic)
and not request.has_permission("edit", topic) %}
<li>

Loading…
Cancel
Save