Commit Graph

7 Commits

Author SHA1 Message Date
Guo Xiang Tan 3b337bfc6b Revert "FIX: Don't rate limit admin and staff constraints when matching routes."
This reverts commit 651b50b1a1.
2018-09-04 14:27:21 +08:00
Guo Xiang Tan 651b50b1a1 FIX: Don't rate limit admin and staff constraints when matching routes.
* When an error is raised when checking route constraints, we
  can only return true/false which either lets the request
  through or return a 404 error. Therefore, we just skip
  rate limiting here and let the controller handle the
  rate limiting.
2018-09-04 13:52:58 +08:00
Robin Ward a8f211bd41 Extensibility for custom staff check 2018-03-28 14:48:14 -04:00
Guo Xiang Tan f7d3702454 FIX: Return 404 if API access is invalid. 2017-08-10 18:27:01 +09:00
Sam 7993845bfa add current_user_provider so people can override current_user bevior cleanly, see
http://meta.discourse.org/t/amending-current-user-logic-in-discourse/10278
2013-10-09 15:11:54 +11:00
nirnanaaa 00c1c4691d there is a scope in User model but not used in staff_constraint 2013-05-29 19:54:23 +02:00
Sam 5ec52bd2e9 :s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff 2013-05-02 17:22:27 +10:00