mirror of
https://gitlab.com/tildes/tildes.git
synced 2026-04-16 14:28:32 +02:00
Don't show View Markdown for logged-out users
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user