1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 23:32:40 +01:00
phorge-phorge/src/applications
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
..
almanac Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
aphlict minor: fix translation error in exception 2018-06-04 17:46:13 +00:00
arcanist/conduit
audit Address a transaction issue with some audit actions not applying correctly 2018-12-09 16:39:21 -08:00
auth Allow applications to require a High Security token without doing a session upgrade 2018-11-28 13:39:59 -08:00
badges Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
base Allow "Can Configure Application" permissions to be configured 2018-11-19 07:25:41 -08:00
cache Update PhabricatorLiskDAO::chunkSQL() for new %Q semantics 2018-11-13 08:59:18 -08:00
calendar Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
celerity Emit a "Content-Security-Policy" HTTP header 2018-02-27 10:17:30 -08:00
chatlog Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
conduit Use phutil_microseconds_since(...) to simplify some timing arithmetic 2018-11-08 16:46:32 -08:00
config Remove defunct "metamta.herald.show-hints" Config option 2018-11-26 10:14:25 -08:00
conpherence Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
console Fix some minor errors (DarkConsole warning, unstable Ferret sort) 2018-03-18 15:12:25 -07:00
countdown Use object PHIDs for "Thread-Topic" headers in mail 2018-02-08 06:21:00 -08:00
daemon Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
dashboard Make the dashboard panel datasource work properly with hundreds of panels 2018-06-28 08:54:29 -07:00
differential Tailor the "no reviewers on this revision" warnings to handle the case where all reviewers have resigned 2018-11-28 13:50:29 -08:00
diffusion Address a transaction issue with some audit actions not applying correctly 2018-12-09 16:39:21 -08:00
diviner Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
doorkeeper Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
draft/storage When purging drafts after a transaction edit, purge all drafts 2018-02-11 06:01:09 -08:00
drydock Make the repository "Filesize Limit" and "Clone/Fetch Timeout" configurable in the UI 2018-11-28 14:34:00 -08:00
fact Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
favorites Add some missing aural button labels for accessibility 2018-08-17 11:00:29 -07:00
feed Make a Feed query construction less clever/sneaky for new qsprintf() semantics 2018-11-26 10:47:19 -08:00
files Fix all query warnings in "arc unit --everything" 2018-11-15 03:51:25 -08:00
flag Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
fund Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
guides Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
harbormaster Add support for "harbormaster.target.search" 2018-11-28 13:49:27 -08:00
help Redesign header menus and search 2017-01-17 12:13:06 -08:00
herald Add a bin/herald test ... for doing test runs via the CLI 2018-11-15 15:48:52 -08:00
home Update menu item names for Applications -> Favorites 2017-09-05 19:05:03 -07:00
legalpad Allow applications to require a High Security token without doing a session upgrade 2018-11-28 13:39:59 -08:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro When {meme ...} embed has no text, just use the raw file data unmodified 2018-11-06 09:40:22 -08:00
maniphest Replace the informal "array" subtype map with a more formal "SubtypeMap" object 2018-12-09 16:37:35 -08:00
meta Modularize Repository transactions 2018-11-28 14:29:18 -08:00
metamta Remove defunct "metamta.herald.show-hints" Config option 2018-11-26 10:14:25 -08:00
multimeter Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
notification Fix the most significant "phantom notification" badness 2018-04-19 17:24:19 -07:00
nuance Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
oauthserver Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
owners Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
packages Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
passphrase Fix spelling 2017-10-09 10:48:04 -07:00
paste Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
people Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
phame Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
phid Truncate package names in diff table of contents views 2018-06-07 13:17:01 -07:00
phlux Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
pholio Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
phortune Fix some "%Q" behavior in PhortuneMerchantQuery 2018-11-20 07:59:57 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
phrequent Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
phriction Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
phurl Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
policy Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults 2018-04-27 16:56:11 -07:00
ponder Make Facts more modern, DRY, and dimensional 2018-02-19 12:05:19 -08:00
project Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
releeph Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
remarkup/conduit
repository Address a transaction issue with some audit actions not applying correctly 2018-12-09 16:39:21 -08:00
search When waiting for long-running Harbormaster futures to resolve, close idle database connections 2018-11-21 07:53:40 -08:00
settings Make the filetree view width sticky across show/hide and reload 2018-02-22 13:47:41 -08:00
slowvote Prevent users from voting for invalid Slowvote options 2018-11-06 09:21:18 -08:00
spaces Add more mail stamps: tasks, subscribers, projects, spaces 2018-02-06 04:05:46 -08:00
subscriptions Remove requireCapabilities() from ApplicationTransactionEditor and require CAN_EDIT by default 2018-08-24 17:45:56 -07:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Update PhabricatorLiskDAO::chunkSQL() for new %Q semantics 2018-11-13 08:59:18 -08:00
tokens Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
transactions Replace the informal "array" subtype map with a more formal "SubtypeMap" object 2018-12-09 16:37:35 -08:00
typeahead Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
uiexample Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
xhprof Allow XHProf profiles to be drag-and-dropped to upload them 2017-02-23 11:16:19 -08:00