fix bug
This commit is contained in:
parent
6b29a2c2a1
commit
c556b73fbb
|
@ -174,6 +174,6 @@ class Bulletin
|
|||
end
|
||||
def open_comment_for_user(user)
|
||||
role_ids = user.member_profile.roles.collect{|v| v.id.to_s} rescue ['visitor']
|
||||
!self.comment_end_time.blank? && self.open_comment && self.comment_end_time > Time.now && (self.comment_role.any?{|v| role_ids.include?(v)} || self.comment_role.include?('visitor') || (self.comment_role.include?('all_member') && role_ids[0] != 'visitor'))
|
||||
self.open_comment && (self.comment_end_time.blank? || self.comment_end_time > Time.now) && (self.comment_role.any?{|v| role_ids.include?(v)} || self.comment_role.include?('visitor') || (self.comment_role.include?('all_member') && role_ids[0] != 'visitor'))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue