3 final class PhabricatorHeraldApplication
extends PhabricatorApplication
{
5 public function getBaseURI() {
9 public function getIcon() {
13 public function getName() {
17 public function getShortDescription() {
18 return pht('Create Notification Rules');
21 public function getTitleGlyph() {
22 return "\xE2\x98\xBF";
25 public function getHelpDocumentationArticles(PhabricatorUser
$viewer) {
28 'name' => pht('Herald User Guide'),
29 'href' => PhabricatorEnv
::getDoclink('Herald User Guide'),
32 'name' => pht('User Guide: Webhooks'),
33 'href' => PhabricatorEnv
::getDoclink('User Guide: Webhooks'),
38 public function getFlavorText() {
39 return pht('Watch for danger!');
42 public function getApplicationGroup() {
43 return self
::GROUP_UTILITIES
;
46 public function getRemarkupRules() {
48 new HeraldRemarkupRule(),
52 public function getRoutes() {
54 '/H(?P<id>[1-9]\d*)' => 'HeraldRuleViewController',
56 '(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldRuleListController',
57 'new/' => 'HeraldNewController',
58 'create/' => 'HeraldNewController',
59 'edit/(?:(?P<id>[1-9]\d*)/)?' => 'HeraldRuleController',
60 'disable/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/'
61 => 'HeraldDisableController',
62 'test/' => 'HeraldTestConsoleController',
63 'transcript/' => array(
64 '' => 'HeraldTranscriptListController',
65 '(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldTranscriptListController',
66 '(?P<id>[1-9]\d*)/(?:(?P<view>[^/]+)/)?'
67 => 'HeraldTranscriptController',
70 $this->getQueryRoutePattern() => 'HeraldWebhookListController',
71 'view/(?P<id>\d+)/(?:request/(?P<requestID>[^/]+)/)?' =>
72 'HeraldWebhookViewController',
73 $this->getEditRoutePattern('edit/') => 'HeraldWebhookEditController',
74 'test/(?P<id>\d+)/' => 'HeraldWebhookTestController',
75 'key/(?P<action>view|cycle)/(?P<id>\d+)/' =>
76 'HeraldWebhookKeyController',
82 protected function getCustomCapabilities() {
84 HeraldManageGlobalRulesCapability
::CAPABILITY
=> array(
85 'caption' => pht('Global rules can bypass access controls.'),
86 'default' => PhabricatorPolicies
::POLICY_ADMIN
,
88 HeraldCreateWebhooksCapability
::CAPABILITY
=> array(
89 'default' => PhabricatorPolicies
::POLICY_ADMIN
,