Set viewer for all handles loaded in controllers
Summary: I've replaced all `id(new PhabricatorObjectHandleData(...))->loadHandles()` by `$this->loadViewerHandles(...)`. Lint caught one usage in a static method. Test Plan: Displayed revision with sporadic author. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3432
This commit is contained in:
@@ -217,10 +217,14 @@ abstract class PhabricatorController extends AphrontController {
|
||||
|
||||
protected function loadHandles(array $phids) {
|
||||
$phids = array_filter($phids);
|
||||
$this->handles = id(new PhabricatorObjectHandleData($phids))
|
||||
$this->handles = $this->loadViewerHandles($phids);
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function loadViewerHandles(array $phids) {
|
||||
return id(new PhabricatorObjectHandleData($phids))
|
||||
->setViewer($this->getRequest()->getUser())
|
||||
->loadHandles();
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function renderHandlesForPHIDs(array $phids) {
|
||||
|
||||
Reference in New Issue
Block a user