pedagogy: full test suite for pedagogy moderation

This commit is contained in:
2019-06-20 14:57:58 +02:00
parent 171d9a4381
commit 55e822412a
2 changed files with 57 additions and 2 deletions

View File

@ -253,9 +253,9 @@ class UVCommentReport(models.Model):
def is_owned_by(self, user):
"""
Is owned by a pedagogy admin, a superuser or the author himself
Can be created by a pedagogy admin, a superuser or a subscriber
"""
return self.reporter == user or user.is_owner(self.comment.uv)
return user.is_subscribed or user.is_owner(self.comment.uv)
comment = models.ForeignKey(
UVComment,