diff --git a/tildes/tildes/templates/macros/comments.jinja2 b/tildes/tildes/templates/macros/comments.jinja2 index f5c65f4..bd8cea0 100644 --- a/tildes/tildes/templates/macros/comments.jinja2 +++ b/tildes/tildes/templates/macros/comments.jinja2 @@ -202,6 +202,8 @@ {% endif %} + {# Don't show the "View Markdown" button (or dropdown) if the user can edit #} + {% if not request.has_permission("edit", comment) %}
  • + {% endif %}
    {% endif %} diff --git a/tildes/tildes/templates/topic.jinja2 b/tildes/tildes/templates/topic.jinja2 index 99dc818..8f1dd71 100644 --- a/tildes/tildes/templates/topic.jinja2 +++ b/tildes/tildes/templates/topic.jinja2 @@ -173,7 +173,11 @@ {{ post_action_toggle_button("remove", topic, topic.is_removed) }} {% endif %} - {% if topic.is_text_type and request.has_permission("view_content", topic) %} + {# 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.has_permission("view_content", topic) + and not request.has_permission("edit", topic) %}