Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14706528
D13251.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Referenced Files
None
Subscribers
None
D13251.diff
View Options
diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php
--- a/src/applications/base/PhabricatorApplication.php
+++ b/src/applications/base/PhabricatorApplication.php
@@ -582,6 +582,11 @@
}
}
+ public function getCapabilityTemplatePHIDType($capability) {
+ $spec = $this->getCustomCapabilitySpecification($capability);
+ return idx($spec, 'template');
+ }
+
public function getApplicationSearchDocumentTypes() {
return array();
}
diff --git a/src/applications/countdown/application/PhabricatorCountdownApplication.php b/src/applications/countdown/application/PhabricatorCountdownApplication.php
--- a/src/applications/countdown/application/PhabricatorCountdownApplication.php
+++ b/src/applications/countdown/application/PhabricatorCountdownApplication.php
@@ -52,6 +52,7 @@
return array(
PhabricatorCountdownDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for new countdowns.'),
+ 'template' => PhabricatorCountdownCountdownPHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/differential/application/PhabricatorDifferentialApplication.php b/src/applications/differential/application/PhabricatorDifferentialApplication.php
--- a/src/applications/differential/application/PhabricatorDifferentialApplication.php
+++ b/src/applications/differential/application/PhabricatorDifferentialApplication.php
@@ -186,6 +186,7 @@
return array(
DifferentialDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created revisions.'),
+ 'template' => DifferentialRevisionPHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php
--- a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php
+++ b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php
@@ -140,11 +140,16 @@
protected function getCustomCapabilities() {
return array(
- DiffusionDefaultViewCapability::CAPABILITY => array(),
+ DiffusionDefaultViewCapability::CAPABILITY => array(
+ 'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
+ ),
DiffusionDefaultEditCapability::CAPABILITY => array(
'default' => PhabricatorPolicies::POLICY_ADMIN,
+ 'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
+ ),
+ DiffusionDefaultPushCapability::CAPABILITY => array(
+ 'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
),
- DiffusionDefaultPushCapability::CAPABILITY => array(),
DiffusionCreateRepositoriesCapability::CAPABILITY => array(
'default' => PhabricatorPolicies::POLICY_ADMIN,
),
diff --git a/src/applications/drydock/application/PhabricatorDrydockApplication.php b/src/applications/drydock/application/PhabricatorDrydockApplication.php
--- a/src/applications/drydock/application/PhabricatorDrydockApplication.php
+++ b/src/applications/drydock/application/PhabricatorDrydockApplication.php
@@ -72,9 +72,12 @@
protected function getCustomCapabilities() {
return array(
- DrydockDefaultViewCapability::CAPABILITY => array(),
+ DrydockDefaultViewCapability::CAPABILITY => array(
+ 'template' => DrydockBlueprintPHIDType::TYPECONST,
+ ),
DrydockDefaultEditCapability::CAPABILITY => array(
'default' => PhabricatorPolicies::POLICY_ADMIN,
+ 'template' => DrydockBlueprintPHIDType::TYPECONST,
),
DrydockCreateBlueprintsCapability::CAPABILITY => array(
'default' => PhabricatorPolicies::POLICY_ADMIN,
diff --git a/src/applications/files/application/PhabricatorFilesApplication.php b/src/applications/files/application/PhabricatorFilesApplication.php
--- a/src/applications/files/application/PhabricatorFilesApplication.php
+++ b/src/applications/files/application/PhabricatorFilesApplication.php
@@ -60,6 +60,7 @@
return array(
FilesDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created files.'),
+ 'template' => PhabricatorFileFilePHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/fund/application/PhabricatorFundApplication.php b/src/applications/fund/application/PhabricatorFundApplication.php
--- a/src/applications/fund/application/PhabricatorFundApplication.php
+++ b/src/applications/fund/application/PhabricatorFundApplication.php
@@ -55,6 +55,7 @@
return array(
FundDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created initiatives.'),
+ 'tempate' => FundInitiativePHIDType::TYPECONST,
),
FundCreateInitiativesCapability::CAPABILITY => array(
'default' => PhabricatorPolicies::POLICY_ADMIN,
diff --git a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php
--- a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php
+++ b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php
@@ -75,8 +75,12 @@
protected function getCustomCapabilities() {
return array(
LegalpadCreateDocumentsCapability::CAPABILITY => array(),
- LegalpadDefaultViewCapability::CAPABILITY => array(),
- LegalpadDefaultEditCapability::CAPABILITY => array(),
+ LegalpadDefaultViewCapability::CAPABILITY => array(
+ 'template' => PhabricatorLegalpadDocumentPHIDType::TYPECONST,
+ ),
+ LegalpadDefaultEditCapability::CAPABILITY => array(
+ 'template' => PhabricatorLegalpadDocumentPHIDType::TYPECONST,
+ ),
);
}
diff --git a/src/applications/maniphest/application/PhabricatorManiphestApplication.php b/src/applications/maniphest/application/PhabricatorManiphestApplication.php
--- a/src/applications/maniphest/application/PhabricatorManiphestApplication.php
+++ b/src/applications/maniphest/application/PhabricatorManiphestApplication.php
@@ -131,9 +131,11 @@
return array(
ManiphestDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created tasks.'),
+ 'template' => ManiphestTaskPHIDType::TYPECONST,
),
ManiphestDefaultEditCapability::CAPABILITY => array(
'caption' => pht('Default edit policy for newly created tasks.'),
+ 'template' => ManiphestTaskPHIDType::TYPECONST,
),
ManiphestEditStatusCapability::CAPABILITY => array(),
ManiphestEditAssignCapability::CAPABILITY => array(),
diff --git a/src/applications/nuance/application/PhabricatorNuanceApplication.php b/src/applications/nuance/application/PhabricatorNuanceApplication.php
--- a/src/applications/nuance/application/PhabricatorNuanceApplication.php
+++ b/src/applications/nuance/application/PhabricatorNuanceApplication.php
@@ -72,9 +72,11 @@
return array(
NuanceSourceDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created sources.'),
+ 'template' => NuanceSourcePHIDType::TYPECONST,
),
NuanceSourceDefaultEditCapability::CAPABILITY => array(
'caption' => pht('Default edit policy for newly created sources.'),
+ 'template' => NuanceSourcePHIDType::TYPECONST,
),
NuanceSourceManageCapability::CAPABILITY => array(),
);
diff --git a/src/applications/paste/application/PhabricatorPasteApplication.php b/src/applications/paste/application/PhabricatorPasteApplication.php
--- a/src/applications/paste/application/PhabricatorPasteApplication.php
+++ b/src/applications/paste/application/PhabricatorPasteApplication.php
@@ -64,9 +64,11 @@
return array(
PasteDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for newly created pastes.'),
+ 'template' => PhabricatorPastePastePHIDType::TYPECONST,
),
PasteDefaultEditCapability::CAPABILITY => array(
'caption' => pht('Default edit policy for newly created pastes.'),
+ 'template' => PhabricatorPastePastePHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/pholio/application/PhabricatorPholioApplication.php b/src/applications/pholio/application/PhabricatorPholioApplication.php
--- a/src/applications/pholio/application/PhabricatorPholioApplication.php
+++ b/src/applications/pholio/application/PhabricatorPholioApplication.php
@@ -71,8 +71,12 @@
protected function getCustomCapabilities() {
return array(
- PholioDefaultViewCapability::CAPABILITY => array(),
- PholioDefaultEditCapability::CAPABILITY => array(),
+ PholioDefaultViewCapability::CAPABILITY => array(
+ 'template' => PholioMockPHIDType::TYPECONST,
+ ),
+ PholioDefaultEditCapability::CAPABILITY => array(
+ 'template' => PholioMockPHIDType::TYPECONST,
+ ),
);
}
diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php
--- a/src/applications/project/application/PhabricatorProjectApplication.php
+++ b/src/applications/project/application/PhabricatorProjectApplication.php
@@ -119,16 +119,16 @@
'default' => PhabricatorPolicies::POLICY_ADMIN,
),
ProjectDefaultViewCapability::CAPABILITY => array(
- 'caption' => pht(
- 'Default view policy for newly created projects.'),
+ 'caption' => pht('Default view policy for newly created projects.'),
+ 'template' => PhabricatorProjectProjectPHIDType::TYPECONST,
),
ProjectDefaultEditCapability::CAPABILITY => array(
- 'caption' => pht(
- 'Default edit policy for newly created projects.'),
+ 'caption' => pht('Default edit policy for newly created projects.'),
+ 'template' => PhabricatorProjectProjectPHIDType::TYPECONST,
),
ProjectDefaultJoinCapability::CAPABILITY => array(
- 'caption' => pht(
- 'Default join policy for newly created projects.'),
+ 'caption' => pht('Default join policy for newly created projects.'),
+ 'template' => PhabricatorProjectProjectPHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php
--- a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php
+++ b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php
@@ -64,6 +64,7 @@
return array(
PhabricatorSlowvoteDefaultViewCapability::CAPABILITY => array(
'caption' => pht('Default view policy for new polls.'),
+ 'template' => PhabricatorSlowvotePollPHIDType::TYPECONST,
),
);
}
diff --git a/src/applications/spaces/application/PhabricatorSpacesApplication.php b/src/applications/spaces/application/PhabricatorSpacesApplication.php
--- a/src/applications/spaces/application/PhabricatorSpacesApplication.php
+++ b/src/applications/spaces/application/PhabricatorSpacesApplication.php
@@ -73,10 +73,12 @@
),
PhabricatorSpacesCapabilityDefaultView::CAPABILITY => array(
'caption' => pht('Default view policy for newly created spaces.'),
+ 'template' => PhabricatorSpacesNamespacePHIDType::TYPECONST,
),
PhabricatorSpacesCapabilityDefaultEdit::CAPABILITY => array(
'caption' => pht('Default edit policy for newly created spaces.'),
'default' => PhabricatorPolicies::POLICY_ADMIN,
+ 'template' => PhabricatorSpacesNamespacePHIDType::TYPECONST,
),
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 2:01 AM (7 h, 19 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6999765
Default Alt Text
D13251.diff (11 KB)
Attached To
Mode
D13251: Add a "template" parameter to application default policies
Attached
Detach File
Event Timeline
Log In to Comment