Commits

Stanislav Panasik committed 59c515f

Added check for forum moderator permission

Comments (0)

Files changed (1)

     form_kwargs = dict(instance=post, initial={'title': post.topic.name})
     
     moderator = (request.user.is_superuser or
-                 request.user in post.topic.forum.moderators.all())
+                 request.user in post.topic.forum.moderators.all() or
+                 have_permissions(request, post.topic.forum, 'allow-moderate'))
     
     form_class = EditPostForm
     if post.id == head_post_id and moderator: