1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 04:32:43 +01:00
phorge-phorge/src/applications/diffusion/controller
epriestley b88a87c43a Address a transaction issue with some audit actions not applying correctly
Summary:
See <https://discourse.phabricator-community.org/t/cannot-accept-commits-in-audit/2166/>.

In D19842, I changed `PhabricatorEditField->shouldGenerateTransactionsFromComment()`.

  - Previously, it bailed on `getIsConduitOnly()`.
  - After the patch, it bails on a missing `getCommentActionLabel()`.

The old code was actually wrong, and it was previously possible to apply possibly-invalid actions in some cases (or, at least, sneak them through this layer: they would only actually apply if not validated properly).

In practice, it let a different bug through: we sometimes loaded commits without loading their audit authority, so testing whether the viewer could "Accept" the commit or not (or take some other actions like "Raise Concern") would always fail and throw an exception: "Trying to access data not attached to this object..."

Fixing the insufficiently-strict transaction generation code exposed the "authority not attached" bug, which caused some actions to fail to generate transactions.

This appeared in the UI as either an unhelpful error ("You can't post an empty comment") or an action with no effect. The unhelpful error was because we show that error if you aren't taking any //other// actions, and we wouldn't generate an "Accept" action because of the interaction of these bugs, so the code thought you were just posting an empty comment.

Test Plan: Without leaving comments, accepted and rejected commits. No more error messages, and actions took effect.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: stephan.senkbeil, hskiba

Differential Revision: https://secure.phabricator.com/D19845
2018-12-09 16:39:21 -08:00
..
DiffusionBlameController.php Migrate DiffusionBlameController to use repo identities 2018-09-26 14:45:58 -07:00
DiffusionBranchTableController.php Add an explicit "null" to a missed diffusion.branchquery callsite to fix Diffusion "Branches" page 2018-07-23 11:21:11 -07:00
DiffusionBrowseController.php Restore coverage reporting to Diffusion browse UI 2018-04-17 14:51:47 -07:00
DiffusionChangeController.php Update Diffusion UI 2016-03-17 12:05:14 -07:00
DiffusionCloneController.php Move Clone Repository to Dialog 2017-07-11 13:16:47 -07:00
DiffusionCommitBranchesController.php If "branch" is provided to "diffusion.branchquery", use it as the "<pattern>" argument to "git branch --contains ..." 2018-06-22 17:38:19 -07:00
DiffusionCommitController.php Address a transaction issue with some audit actions not applying correctly 2018-12-09 16:39:21 -08:00
DiffusionCommitEditController.php Replace old commit edit controller with new EditEngine controller 2017-01-11 10:37:53 -08:00
DiffusionCommitListController.php Merge "Audit" more completely into "Diffusion" 2017-01-11 16:28:42 -08:00
DiffusionCommitTagsController.php Show first 10 branches, then "More Branches" for commits on huge numbers of branches 2016-02-16 15:10:01 -08:00
DiffusionCompareController.php Mobile layouts for Diffusion 2017-08-30 12:28:00 -07:00
DiffusionController.php Fix broken suggestion/validation for Owners paths in repositories with short names 2018-03-07 18:31:25 -08:00
DiffusionDiffController.php Modernize most somewhat-weird Diffusion controllers 2016-01-05 14:00:57 -08:00
DiffusionDocumentController.php Move Diffusion browse rendering to DocumentEngine, breaking almost all features 2018-04-09 04:46:26 -07:00
DiffusionExternalController.php Fix two issues with callsign-free repositories 2016-02-26 06:13:46 -08:00
DiffusionGraphController.php Mobile layouts for Diffusion 2017-08-30 12:28:00 -07:00
DiffusionHistoryController.php Add branch, tag info to Diffusion Headers 2017-08-16 12:16:15 -07:00
DiffusionIdentityEditController.php Add controllers/search/edit engine functionality to RepositoryIdentity 2018-05-31 07:03:25 -07:00
DiffusionIdentityListController.php Add controllers/search/edit engine functionality to RepositoryIdentity 2018-05-31 07:03:25 -07:00
DiffusionIdentityViewController.php Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
DiffusionInlineCommentController.php Allow reviewers to mark their own inlines as "Done" before they submit them 2018-09-07 11:17:42 -07:00
DiffusionInlineCommentPreviewController.php Touch up PHP/JS interactions for inline comments 2015-03-27 17:08:31 -07:00
DiffusionLastModifiedController.php Update DiffusionLastModifiedController to use identities 2018-08-17 12:24:21 -07:00
DiffusionLintController.php Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
DiffusionLogController.php Add a basic view for repository pull logs 2018-01-23 14:10:10 -08:00
DiffusionPathCompleteController.php Modernize most somewhat-weird Diffusion controllers 2016-01-05 14:00:57 -08:00
DiffusionPathTreeController.php Modernize most somewhat-weird Diffusion controllers 2016-01-05 14:00:57 -08:00
DiffusionPathValidateController.php Use a tokenizer, not a gigantic poorly-ordered "<select />", to choose repositories in Owners 2018-03-07 20:57:24 -08:00
DiffusionPullLogListController.php Make push log "flags", "reject code" human readable; add crumbs to pull/push logs 2018-01-30 15:45:58 -08:00
DiffusionPushEventViewController.php Add a basic view for repository pull logs 2018-01-23 14:10:10 -08:00
DiffusionPushLogListController.php Make push log "flags", "reject code" human readable; add crumbs to pull/push logs 2018-01-30 15:45:58 -08:00
DiffusionRefTableController.php Modernize more Diffusion controllers 2016-01-05 14:00:20 -08:00
DiffusionRepositoryController.php Add a basic web UI for intracluster sync logs 2018-11-10 04:58:36 -08:00
DiffusionRepositoryDefaultController.php Redirect /source/x (no slash) to /source/x/ (canonical) when viewer is logged out and "x" is public 2016-12-20 07:48:20 -08:00
DiffusionRepositoryEditActivateController.php Modularize Repository transactions 2018-11-28 14:29:18 -08:00
DiffusionRepositoryEditController.php Simplify Create Repository page 2017-08-15 11:05:50 -07:00
DiffusionRepositoryEditDangerousController.php Modularize Repository transactions 2018-11-28 14:29:18 -08:00
DiffusionRepositoryEditDeleteController.php Sort out EditController / ManageController / EditproController Diffusion hierarchy 2016-05-10 05:14:09 -07:00
DiffusionRepositoryEditEnormousController.php Modularize Repository transactions 2018-11-28 14:29:18 -08:00
DiffusionRepositoryEditUpdateController.php Update Repository Management pages to new fixed UI 2017-09-05 19:01:27 -07:00
DiffusionRepositoryListController.php Fix two strings with missing pht() 2017-04-07 10:07:01 -07:00
DiffusionRepositoryManageController.php Update Repository Management pages to new fixed UI 2017-09-05 19:01:27 -07:00
DiffusionRepositoryManagePanelsController.php Separate the repository management UI into sections 2018-11-28 13:53:30 -08:00
DiffusionRepositoryProfilePictureController.php Add more repo images 2017-08-08 17:51:15 -07:00
DiffusionRepositoryTestAutomationController.php Sort out EditController / ManageController / EditproController Diffusion hierarchy 2016-05-10 05:14:09 -07:00
DiffusionRepositoryURICredentialController.php Fill in new URI credential edit web UI interfaces 2016-05-02 04:26:13 -07:00
DiffusionRepositoryURIDisableController.php Prevent users from disabling repository builtin URIs 2016-05-12 12:09:23 -07:00
DiffusionRepositoryURIEditController.php Flesh out more web UI actions for new URI interface 2016-04-29 17:16:15 -07:00
DiffusionRepositoryURIViewController.php Remove completely pointless load of every repository when viewing a repository URI 2018-02-08 12:47:48 -08:00
DiffusionServeController.php Allow repository cluster bindings to be marked as not "writable", making them read-only 2018-04-12 16:10:36 -07:00
DiffusionSymbolController.php Provide character position information to symbol queries 2018-01-26 13:01:57 -08:00
DiffusionSyncLogListController.php Add a basic web UI for intracluster sync logs 2018-11-10 04:58:36 -08:00
DiffusionTagListController.php Add branch, tag info to Diffusion Headers 2017-08-16 12:16:15 -07:00