Fixes #2694: hide "revert all" when user has over 1000 post changes

This commit is contained in:
Type-kun
2017-01-16 18:43:36 +05:00
parent 5ce26c2e52
commit 15b711e423
2 changed files with 5 additions and 1 deletions

View File

@@ -25,4 +25,8 @@ class UserRevert
x.undo!
end
end
def self.can_revert?(user)
user.post_update_count <= THRESHOLD
end
end