1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 18:52:42 +01:00
phorge-phorge/src/applications/auth/storage
epriestley 9f5e6bee90 Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw"
Summary:
Depends on D20115. See <https://discourse.phabricator-community.org/t/transaction-search-endpoint-does-not-work-on-differential-diffs/2369/>.

Currently, `getApplicationTransactionCommentObject()` throws by default. Subclasses must override it to `return null` to indicate that they don't support comments.

This is silly, and leads to a bunch of code that does a `try / catch` around it, and at least some code (here, `transaction.search`) which doesn't `try / catch` and gets the wrong behavior as a result.

Just make it `return null` by default, meaning "no support for comments". Then remove the `try / catch` stuff and all the `return null` implementations.

Test Plan:
  - Grepped for `getApplicationTransactionCommentObject()`, fixed each callsite / definition.
  - Called `transaction.search` on a diff with transactions (i.e., not a sourced-from-commit diff).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: jbrownEP

Differential Revision: https://secure.phabricator.com/D20121
2019-02-07 14:56:38 -08:00
..
PhabricatorAuthChallenge.php Give Duo MFA a stronger hint if users continue without answering the challenge 2019-02-05 14:14:41 -08:00
PhabricatorAuthContactNumber.php Always require MFA to edit contact numbers 2019-01-23 14:19:56 -08:00
PhabricatorAuthContactNumberTransaction.php Add "Contact Numbers" so we can send users SMS mesages 2019-01-23 13:39:56 -08:00
PhabricatorAuthDAO.php Add storage for Auth configuration in preparation for moving it into a web interface 2013-06-17 10:48:41 -07:00
PhabricatorAuthFactorConfig.php Allow MFA providers to be deprecated or disabled 2019-01-28 09:29:27 -08:00
PhabricatorAuthFactorProvider.php Allow MFA enrollment guidance to be customized 2019-01-30 06:21:58 -08:00
PhabricatorAuthFactorProviderTransaction.php Add a skeleton for configurable MFA provider types 2019-01-16 12:27:23 -08:00
PhabricatorAuthHMACKey.php Support HMAC+SHA256 with automatic key generation and management 2017-04-06 15:42:59 -07:00
PhabricatorAuthInvite.php Send emails for email invites 2015-02-11 06:06:09 -08:00
PhabricatorAuthMessage.php Use the customizable "Welcome Mail" message in welcome mail 2019-01-18 19:55:44 -08:00
PhabricatorAuthMessageTransaction.php Add "Auth Messages" to support customizing onboarding/welcome flows 2019-01-18 19:53:19 -08:00
PhabricatorAuthPassword.php Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
PhabricatorAuthPasswordTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhabricatorAuthProviderConfig.php In "External Accounts", replace hard-to-find tiny "link" icon with a nice button with text on it 2019-02-06 16:07:16 -08:00
PhabricatorAuthProviderConfigTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhabricatorAuthSession.php Make partial sessions expire after 30 minutes, and do not extend them 2018-12-28 00:17:01 -08:00
PhabricatorAuthSSHKey.php Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
PhabricatorAuthSSHKeyTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhabricatorAuthTemporaryToken.php Allow different MFA factor types (SMS, TOTP, Duo, ...) to share "sync" tokens when enrolling new factors 2019-01-23 14:13:50 -08:00