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

Use the configured viewer more consistently in the Herald commit adapter

Summary: See PHI276. Ref T13048. The fix in D18933 got one callsite, but missed the one in the `callConduit()` method, so the issue isn't fully fixed in production. Convert this adapter to use a real viewer (if one is available) more thoroughly.

Test Plan: Ran rules in test console, saw field values. Will test in production again.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13048

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

+9 -3
+9 -3
src/applications/diffusion/herald/HeraldCommitAdapter.php
··· 135 135 } 136 136 137 137 public function loadAffectedPaths() { 138 + $viewer = $this->getViewer(); 139 + 138 140 if ($this->affectedPaths === null) { 139 141 $result = PhabricatorOwnerPathQuery::loadAffectedPaths( 140 142 $this->getRepository(), 141 143 $this->commit, 142 - PhabricatorUser::getOmnipotentUser()); 144 + $viewer); 143 145 $this->affectedPaths = $result; 144 146 } 147 + 145 148 return $this->affectedPaths; 146 149 } 147 150 ··· 172 175 } 173 176 174 177 public function loadDifferentialRevision() { 178 + $viewer = $this->getViewer(); 179 + 175 180 if ($this->affectedRevision === null) { 176 181 $this->affectedRevision = false; 177 182 ··· 189 194 190 195 $revision = id(new DifferentialRevisionQuery()) 191 196 ->withIDs(array($revision_id)) 192 - ->setViewer(PhabricatorUser::getOmnipotentUser()) 197 + ->setViewer($viewer) 193 198 ->needReviewers(true) 194 199 ->executeOne(); 195 200 if ($revision) { ··· 197 202 } 198 203 } 199 204 } 205 + 200 206 return $this->affectedRevision; 201 207 } 202 208 ··· 323 329 } 324 330 325 331 private function callConduit($method, array $params) { 326 - $viewer = PhabricatorUser::getOmnipotentUser(); 332 + $viewer = $this->getViewer(); 327 333 328 334 $drequest = DiffusionRequest::newFromDictionary( 329 335 array(