1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
phorge-phorge/src/applications/paste
Bob Trahan 3ef0721ada 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
2015-05-15 14:07:17 -07:00
..
application Fix some odd looking arrays 2015-04-05 22:29:39 +10:00
capability Paste: Add edit policy 2014-12-31 08:24:57 -08:00
conduit Give Conduit params/return/errors protected visibility 2015-04-13 11:58:35 -07:00
config Add getGroup to ConfigOptions 2015-02-09 13:10:56 -08:00
controller Convert all tokenizers to take token/scalar inputs 2015-03-31 14:10:55 -07:00
editor Add Mailtags to Paste 2015-04-13 15:30:59 -07:00
lipsum Minor formatting changes 2014-10-08 08:39:49 +11:00
mail Expose all application mail receivers 2015-04-01 11:52:02 -07:00
phid Rename PHIDType classes 2014-07-24 08:05:46 +10:00
query Make buildWhereClause() a method of AphrontCursorPagedPolicyAwareQuery 2015-04-20 10:06:09 -07:00
remarkup Add some missing type hints 2015-05-05 07:33:00 +10:00
storage Reduce PhabricatorUser::getOmnipotentUser calls by adding a getViewer method to PhbaricatorDestructionEngine 2015-05-15 14:07:17 -07:00
view Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00