mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Revert "FIX: Don't rate limit admin and staff constraints when matching routes."
This reverts commit 651b50b1a1
.
This commit is contained in:
parent
e4498d2a8a
commit
3b337bfc6b
4 changed files with 12 additions and 36 deletions
|
@ -8,8 +8,7 @@ class AdminConstraint
|
|||
|
||||
def matches?(request)
|
||||
return false if @require_master && RailsMultisite::ConnectionManagement.current_db != "default"
|
||||
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.admin? &&
|
||||
custom_admin_check(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue