Skip to content

Commit

Permalink
demorgan
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Oct 24, 2017
1 parent 9299c08 commit 476c04c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def self.arrange_for_user(user)
# for deleted comments, if they have no children, they can be removed
# from the tree. otherwise they have to stay and a "[deleted]" stub
# will be shown
if node.is_gone? and # deleted or moderated
!children.present? and # no have child comments
(user && (user.is_moderator? || node.user_id == user.id))
if node.is_gone? && # deleted or moderated
!children.present? && # don't have child comments
(!user || (!user.is_moderator? && node.user_id != user.id))
# admins and authors should be able to see their deleted comments
next
end
Expand Down

0 comments on commit 476c04c

Please sign in to comment.