diff --git a/src/applications/countdown/application/PhabricatorCountdownApplication.php b/src/applications/countdown/application/PhabricatorCountdownApplication.php index b3b5a79da2..e205ba64c3 100644 --- a/src/applications/countdown/application/PhabricatorCountdownApplication.php +++ b/src/applications/countdown/application/PhabricatorCountdownApplication.php @@ -50,6 +50,10 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( + PhabricatorCountdownCreateCapability::CAPABILITY => array( + 'default' => PhabricatorPolicies::POLICY_USER, + 'caption' => pht('Default create policy for countdowns.'), + ), PhabricatorCountdownDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for new countdowns.'), 'template' => PhabricatorCountdownCountdownPHIDType::TYPECONST, diff --git a/src/applications/countdown/capability/PhabricatorCountdownCreateCapability.php b/src/applications/countdown/capability/PhabricatorCountdownCreateCapability.php new file mode 100644 index 0000000000..057b6c22d9 --- /dev/null +++ b/src/applications/countdown/capability/PhabricatorCountdownCreateCapability.php @@ -0,0 +1,16 @@ +getURI(); } + protected function getCreateNewObjectPolicy() { + return $this->getApplication()->getPolicy( + PhabricatorCountdownCreateCapability::CAPABILITY); + } + protected function buildCustomEditFields($object) { $epoch_value = $object->getEpoch(); if ($epoch_value === null) {