1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 11:52:40 +01:00
phorge-phorge/src/applications/search/field
epriestley 38ae81fb39 Throw when callers pass an invalid constraint to a "*.search" method
Summary:
Ref T11593. When you call a `*.search` method like `maniphest.search`, we don't currently validate that all the constraints you pass are recognized.

I think there were two very weak arguments for not doing this:

  - It makes compatibility in `arc` across versions slightly easier: if we add a new constraint, we could add it to `arc` but also do client-side filtering for a while.
  - Conduit parameter types //could//, in theory, accept multiple inputs or optional/alias inputs.

These reasons are pretty fluff and T11593 is a concrete issue caused by not validating. Just validate instead.

Test Plan:
  - Made a `maniphest.search` call with a bogus constraint, got an explicit error about the bad constraint.
  - Made a `maniphest.search` call with a valid constraint (`"ids"`).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11593

Differential Revision: https://secure.phabricator.com/D16507
2016-09-07 09:07:53 -07:00
..
PhabricatorIDsSearchField.php Don't allow empty list constraints in Conduit calls 2016-08-14 08:31:13 -07:00
PhabricatorPHIDsSearchField.php Don't allow empty list constraints in Conduit calls 2016-08-14 08:31:13 -07:00
PhabricatorSearchCheckboxesField.php Add basic typechecking support to Conduit 2015-12-14 04:21:39 -08:00
PhabricatorSearchCustomFieldProxyField.php Flesh out Conduit parameter types for Owners + CustomFields 2015-12-14 04:23:44 -08:00
PhabricatorSearchDatasourceField.php Don't allow empty list constraints in Conduit calls 2016-08-14 08:31:13 -07:00
PhabricatorSearchDateControlField.php Refactor Calendar Search, and implement Projects on events 2015-06-22 13:27:37 -07:00
PhabricatorSearchDateField.php Correct an issue with epoch timestamps in Conduit 2016-07-26 11:02:46 -07:00
PhabricatorSearchField.php Throw when callers pass an invalid constraint to a "*.search" method 2016-09-07 09:07:53 -07:00
PhabricatorSearchOrderField.php Make "Order By" field render correctly when showing a SavedQuery with an order alias 2015-06-09 13:49:01 -07:00
PhabricatorSearchSelectField.php Convert Macro to SearchFields 2015-06-08 12:22:09 -07:00
PhabricatorSearchStringListField.php Update Buildable search in Harbormaster 2016-02-27 07:13:10 -08:00
PhabricatorSearchSubscribersField.php Flesh out Conduit types for Paste search fields 2015-12-14 04:23:28 -08:00
PhabricatorSearchTextField.php Expose modern *.search Conduit endpoints in Almanac 2016-02-23 08:20:57 -08:00
PhabricatorSearchThreeStateField.php Add a modern user.search Conduit API method 2016-05-22 05:54:31 -07:00
PhabricatorSearchTokenizerField.php Make Subscribers automatically provide working SearchFields 2015-06-08 12:20:53 -07:00