diff --git a/kitsune/questions/jinja2/questions/question_details.html b/kitsune/questions/jinja2/questions/question_details.html index 6eb63addc63..a0f72c52033 100644 --- a/kitsune/questions/jinja2/questions/question_details.html +++ b/kitsune/questions/jinja2/questions/question_details.html @@ -435,7 +435,7 @@

{{ _('Post a Reply') }}

{% endif %} - {% if is_trusted_user(request.user) %} + {% if not question.is_moderated and is_trusted_user(request.user) %}
  • diff --git a/kitsune/questions/models.py b/kitsune/questions/models.py index ce2e07eb438..a1dba3a3063 100755 --- a/kitsune/questions/models.py +++ b/kitsune/questions/models.py @@ -1,6 +1,7 @@ import logging import re from datetime import datetime, timedelta +from functools import cached_property from urllib.parse import urlparse import actstream @@ -392,6 +393,14 @@ def is_solved(self): def is_offtopic(self): return config.OFFTOPIC_TAG_NAME in [t.name for t in self.my_tags] + @cached_property + def is_moderated(self): + return ( + self.flags.filter(reason=FlaggedObject.REASON_CONTENT_MODERATION) + .exclude(status=FlaggedObject.FLAG_PENDING) + .exists() + ) + @property def my_tags(self): """A caching wrapper around self.tags.all()."""