Delete all posts is allowed for the same amount of time as delete user

This commit is contained in:
Neil Lalonde
2013-08-13 11:10:50 -04:00
parent 9782d3777e
commit b8a1e21dbd
2 changed files with 7 additions and 5 deletions

View File

@ -203,7 +203,7 @@ class Guardian
end
def can_delete_all_posts?(user)
is_staff? && user && !user.admin? && user.created_at >= 7.days.ago && user.post_count <= SiteSetting.delete_all_posts_max.to_i
is_staff? && user && !user.admin? && user.created_at >= SiteSetting.delete_user_max_age.days.ago && user.post_count <= SiteSetting.delete_all_posts_max.to_i
end
def can_remove_allowed_users?(topic)