Page MenuHomePhabricator

Reduce PhabricatorUser::getOmnipotentUser calls by adding a getViewer method to PhbaricatorDestructionEngine
ClosedPublic

Authored by btrahan on May 15 2015, 9:02 PM.
Tags
None
Referenced Files
F18601800: D12866.diff
Sat, Sep 13, 1:31 PM
F18599587: D12866.id30949.diff
Sat, Sep 13, 7:45 AM
F18586623: D12866.id30949.diff
Thu, Sep 11, 7:13 PM
F18468069: D12866.id30950.diff
Tue, Sep 2, 2:14 PM
F18394193: D12866.id30950.diff
Fri, Aug 29, 9:46 AM
F18394026: D12866.id30950.diff
Fri, Aug 29, 9:38 AM
F18393666: D12866.id30949.diff
Fri, Aug 29, 9:21 AM
F18393518: D12866.id30949.diff
Fri, Aug 29, 9:14 AM
Subscribers
Tokens
"Evil Spooky Haunted Tree" token, awarded by epriestley.

Details

Summary

Fixes T6956. Before this change, we called PhabricatorUser::getOmnipotentUser in the various delete methods to query the data. Now, we use $engine->getViewer(), since its always a good thing to have less calls to PhabricatorUser::getOmnipotentUser thrown around the codebase.

I used the "codemod" tool to audit the existing calls to PhabricatorDestructorEngine (all of them) so ostensibly this gets all the spots. If I missed something though, its still going to work, so this change is very low risk.

Test Plan

./bin/remove destroy P1; visit P1 and get a 404

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Reduce PhabricatorUser::getOmnipotentUser calls by adding a getViewer method to PhbaricatorDestructionEngine.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.May 15 2015, 9:06 PM
This revision was automatically updated to reflect the committed changes.