@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.

Replace "Disable User" web UI flow with transactions

Summary:
Ref T13189. See PHI642. Upgrades the "Disable" action in the web UI to be transaction-based.

This technically breaks things a little (you can't disable non-bot users, since they now require CAN_EDIT and you won't have it) but an upcoming change will fix the permissions issue.

Test Plan: Disabled and enabled a (bot) user from the web UI.

Reviewers: amckinley

Maniphest Tasks: T13189

Differential Revision: https://secure.phabricator.com/D19604

+11 -2
+11 -2
src/applications/people/controller/PhabricatorPeopleDisableController.php
··· 39 39 } 40 40 41 41 if ($request->isFormPost()) { 42 - id(new PhabricatorUserEditor()) 42 + $xactions = array(); 43 + 44 + $xactions[] = id(new PhabricatorUserTransaction()) 45 + ->setTransactionType(PhabricatorUserDisableTransaction::TRANSACTIONTYPE) 46 + ->setNewValue($should_disable); 47 + 48 + id(new PhabricatorUserTransactionEditor()) 43 49 ->setActor($viewer) 44 - ->disableUser($user, $should_disable); 50 + ->setContentSourceFromRequest($request) 51 + ->setContinueOnMissingFields(true) 52 + ->setContinueOnNoEffect(true) 53 + ->applyTransactions($user, $xactions); 45 54 46 55 return id(new AphrontRedirectResponse())->setURI($done_uri); 47 56 }