Homestyx hydra
Diffusion hydra 3ef0721adacc

Reduce PhabricatorUser::getOmnipotentUser calls by adding a getViewer method to…

Description

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

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

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6956

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

Details

Provenance
Bob TrahanAuthored on May 15 2015, 5:07 PM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:b6733e4a8643: Phame - move over post creation and edit to use an editor
Branches
Unknown
Tags
Unknown

Event Timeline