Differential D20407 Diff 48714 src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php
| <?php | <?php | ||||
| final class PhabricatorDashboardViewController | final class PhabricatorDashboardViewController | ||||
| extends PhabricatorDashboardProfileController { | extends PhabricatorDashboardProfileController { | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
| $viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
| $id = $request->getURIData('id'); | $id = $request->getURIData('id'); | ||||
| $dashboard = id(new PhabricatorDashboardQuery()) | $dashboard = id(new PhabricatorDashboardQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withIDs(array($id)) | ->withIDs(array($id)) | ||||
| ->needPanels(true) | |||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$dashboard) { | if (!$dashboard) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $this->setDashboard($dashboard); | $this->setDashboard($dashboard); | ||||
| $can_edit = PhabricatorPolicyFilter::hasCapability( | $can_edit = PhabricatorPolicyFilter::hasCapability( | ||||
| $viewer, | $viewer, | ||||
| ▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines | |||||