Revert "FIX: Don't rate limit admin and staff constraints when matching routes."

This reverts commit 651b50b1a159258588ebd716f678035db2239b5a.
This commit is contained in:
Guo Xiang Tan
2018-09-04 14:17:05 +08:00
parent e4498d2a8a
commit 3b337bfc6b
4 changed files with 12 additions and 36 deletions

View File

@ -3,8 +3,7 @@ require_dependency 'current_user'
class StaffConstraint
def matches?(request)
provider = Discourse.current_user_provider.new(request.env, rate_limit: false)
provider = Discourse.current_user_provider.new(request.env)
provider.current_user &&
provider.current_user.staff? &&
custom_staff_check(request)