Differential D25189 Diff 663 src/applications/dashboard/controller/panel/PhabricatorDashboardPanelEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/controller/panel/PhabricatorDashboardPanelEditController.php
Show All 9 Lines | $engine = id(new PhabricatorDashboardPanelEditEngine()) | ||||
->setController($this); | ->setController($this); | ||||
// We can create or edit a panel in the context of a dashboard or | // We can create or edit a panel in the context of a dashboard or | ||||
// container panel, like a tab panel. If we started this flow on some | // container panel, like a tab panel. If we started this flow on some | ||||
// container object, we want to return to that container when we're done | // container object, we want to return to that container when we're done | ||||
// editing. | // editing. | ||||
$context_phid = $request->getStr('contextPHID'); | $context_phid = $request->getStr('contextPHID'); | ||||
if (strlen($context_phid)) { | if (phutil_nonempty_string($context_phid)) { | ||||
$context = id(new PhabricatorObjectQuery()) | $context = id(new PhabricatorObjectQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withPHIDs(array($context_phid)) | ->withPHIDs(array($context_phid)) | ||||
->requireCapabilities( | ->requireCapabilities( | ||||
array( | array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
)) | )) | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0