@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make MFA Validation Error dialog link to MFA user settings

Summary:
Allow users to click once to get to their MFA Settings when getting an error that they do not have Multi-Factor Auth set up for their account, instead of letting them perform four clicks.

The higher the threshold of required user interaction, the less likely I'm going to try. Me lazy.

Closes T16175

Test Plan:
* Make sure not to have MFA enabled on your user account in http://phorge.localhost/settings/panel/multifactor/
* Go to http://phorge.localhost/T1
* In the "Add Action..." dropdown, select "Sign With MFA"
* Write something in the comment text field
* Click the "Submit" button
* Check the "Validation Errors" dialog and click a link

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16175

Differential Revision: https://we.phorge.it/D26193

+23 -1
+15
src/applications/settings/panel/PhabricatorSettingsPanel.php
··· 25 25 return $this; 26 26 } 27 27 28 + /** 29 + * @return PhabricatorUser 30 + */ 28 31 public function getUser() { 29 32 return $this->user; 30 33 } ··· 34 37 return $this; 35 38 } 36 39 40 + /** 41 + * @return PhabricatorUser 42 + */ 37 43 public function getViewer() { 38 44 return $this->viewer; 39 45 } ··· 48 54 return $this; 49 55 } 50 56 57 + /** 58 + * @return PhabricatorController 59 + */ 51 60 final public function getController() { 52 61 return $this->controller; 53 62 } ··· 57 66 return $this; 58 67 } 59 68 69 + /** 70 + * @return AphrontSideNavFilterView 71 + */ 60 72 final public function getNavigation() { 61 73 return $this->navigation; 62 74 } ··· 66 78 return $this; 67 79 } 68 80 81 + /** 82 + * @return PhabricatorUserPreferences 83 + */ 69 84 public function getPreferences() { 70 85 return $this->preferences; 71 86 }
+8 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 3208 3208 3209 3209 foreach ($xactions as $xaction) { 3210 3210 if (!$factors) { 3211 + $mfa_panel = id(new PhabricatorMultiFactorSettingsPanel()) 3212 + ->setUser($this->getActor()); 3213 + $mfa_uri = $mfa_panel->getPanelURI(); 3214 + $mfa_panel_name = pht('Settings'); 3215 + $mfa_link = new PhutilSafeHTML( 3216 + '<a href="'.$mfa_uri.'">'.$mfa_panel_name.'</a>'); 3211 3217 $errors[] = new PhabricatorApplicationTransactionValidationError( 3212 3218 $transaction_type, 3213 3219 pht('No MFA'), 3214 3220 pht( 3215 3221 'You do not have any MFA factors attached to your account, so '. 3216 3222 'you can not sign this transaction group with MFA. Add MFA to '. 3217 - 'your account in Settings.'), 3223 + 'your account in %s.', 3224 + $mfa_link), 3218 3225 $xaction); 3219 3226 } 3220 3227 }