Allow custom request checker prior to displaying page
Summary: We want to allow a broader access to our installation but we need to check the request in that case. Test Plan: Created a simple `PhabricatorRequestChecker` returning a custom controller. Verified that this controller is used when accessing any page. Returned `null` from this checker and verified that all 209 Phabricator pages are accessible. Reviewers: epriestley Reviewed By: epriestley CC: scottmac, aran, Korvin, btrahan Differential Revision: https://secure.phabricator.com/D2488
This commit is contained in:
@@ -130,6 +130,22 @@ fields to, e.g., edit revision titles. Data available on this event:
|
||||
- `specification` Parameters that will be used to invoke the
|
||||
`differential.createrevision` Conduit call.
|
||||
|
||||
== Controller: Check Request ==
|
||||
|
||||
The constant for this event is
|
||||
`PhabricatorEventType::TYPE_CONTROLLER_CHECKREQUEST`.
|
||||
|
||||
This event is dispatched when controller is about to begin execution. It is
|
||||
meant for checking if the user is allowed to use the application at the moment.
|
||||
It can check if the user has performed too many operations recently, if his IP
|
||||
address is allowed or if the servers are overloaded to process the request.
|
||||
Data available on this event:
|
||||
|
||||
- `request` Object of class @{class:AphrontRequest}.
|
||||
- `controller` Class name of the current controller.
|
||||
|
||||
You can delegate the execution to another controller by modifying `controller`.
|
||||
|
||||
== Maniphest: Will Edit Task ==
|
||||
|
||||
The constant for this event is
|
||||
|
||||
Reference in New Issue
Block a user