Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not edit question details after moderation #6389

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions kitsune/questions/jinja2/questions/question_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ <h3 class="sumo-card-heading">{{ _('Post a Reply') }}</h3>
{% endif %}
</div>
</li>
{% if not question.is_moderated and is_trusted_user(request.user) %}
{% if is_trusted_user(request.user) %}
<li class="mzp-c-details">
<h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{ _('Question Details') }}</h3>
<div id="question-details" class="question-details">
Expand All @@ -435,7 +435,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if product %}
<span class="detail">{{ pgettext('DB: products.Product.title', product.title) }}</span>
{% endif %}
{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<select id="details-product" name="product">
{% for p in all_products %}
<option {% if product and p.id == product.id %}selected="selected"{% endif %} value="{{ p.id }}" data-url="{{ url('products.product', p.slug) }}">{{ p.title }}</option>
Expand All @@ -451,7 +451,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if topic %}
<span class="detail">{{ pgettext('DB: products.Topic.title', topic.title) }}</span>
{% endif %}
{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<select id="details-topic" name="topic">
{% for t in all_topics %}
<option {% if topic and t.id == topic.id %}selected="selected"{% endif %} value="{{ t.id }}">{{ t.title }}</option>
Expand All @@ -461,7 +461,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
</div>
{% endif %}

{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<div class="sidebox tight condensed" id="question-locale">
<span class="title">{{ _('Locale') }}:</span>
<span class="detail">{{ settings.LANGUAGES_DICT[question.locale.lower()] }}</span>
Expand Down Expand Up @@ -520,7 +520,7 @@ <h3 class="sumo-card-heading">{{ _('Installed Plug-ins') }}</h3>
</section>
</div>

{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<div class="sidebox tight">
<a href="#" id="details-edit">{{ _('Edit details') }}</a>
</div>
Expand Down