Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13960362
D19581.id.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
D19581.id.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1646,13 +1646,8 @@
'ManiphestDAO' => 'applications/maniphest/storage/ManiphestDAO.php',
'ManiphestDefaultEditCapability' => 'applications/maniphest/capability/ManiphestDefaultEditCapability.php',
'ManiphestDefaultViewCapability' => 'applications/maniphest/capability/ManiphestDefaultViewCapability.php',
- 'ManiphestEditAssignCapability' => 'applications/maniphest/capability/ManiphestEditAssignCapability.php',
'ManiphestEditConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestEditConduitAPIMethod.php',
'ManiphestEditEngine' => 'applications/maniphest/editor/ManiphestEditEngine.php',
- 'ManiphestEditPoliciesCapability' => 'applications/maniphest/capability/ManiphestEditPoliciesCapability.php',
- 'ManiphestEditPriorityCapability' => 'applications/maniphest/capability/ManiphestEditPriorityCapability.php',
- 'ManiphestEditProjectsCapability' => 'applications/maniphest/capability/ManiphestEditProjectsCapability.php',
- 'ManiphestEditStatusCapability' => 'applications/maniphest/capability/ManiphestEditStatusCapability.php',
'ManiphestEmailCommand' => 'applications/maniphest/command/ManiphestEmailCommand.php',
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php',
'ManiphestHovercardEngineExtension' => 'applications/maniphest/engineextension/ManiphestHovercardEngineExtension.php',
@@ -7152,13 +7147,8 @@
'ManiphestDAO' => 'PhabricatorLiskDAO',
'ManiphestDefaultEditCapability' => 'PhabricatorPolicyCapability',
'ManiphestDefaultViewCapability' => 'PhabricatorPolicyCapability',
- 'ManiphestEditAssignCapability' => 'PhabricatorPolicyCapability',
'ManiphestEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
'ManiphestEditEngine' => 'PhabricatorEditEngine',
- 'ManiphestEditPoliciesCapability' => 'PhabricatorPolicyCapability',
- 'ManiphestEditPriorityCapability' => 'PhabricatorPolicyCapability',
- 'ManiphestEditProjectsCapability' => 'PhabricatorPolicyCapability',
- 'ManiphestEditStatusCapability' => 'PhabricatorPolicyCapability',
'ManiphestEmailCommand' => 'MetaMTAEmailTransactionCommand',
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'ManiphestConduitAPIMethod',
'ManiphestHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
diff --git a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
--- a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
+++ b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
@@ -361,69 +361,4 @@
return $ancient_config;
}
- private function executeManiphestFieldChecks() {
- $maniphest_appclass = 'PhabricatorManiphestApplication';
- if (!PhabricatorApplication::isClassInstalled($maniphest_appclass)) {
- return;
- }
-
- $capabilities = array(
- ManiphestEditAssignCapability::CAPABILITY,
- ManiphestEditPoliciesCapability::CAPABILITY,
- ManiphestEditPriorityCapability::CAPABILITY,
- ManiphestEditProjectsCapability::CAPABILITY,
- ManiphestEditStatusCapability::CAPABILITY,
- );
-
- // Check for any of these capabilities set to anything other than
- // "All Users".
-
- $any_set = false;
- $app = new PhabricatorManiphestApplication();
- foreach ($capabilities as $capability) {
- $setting = $app->getPolicy($capability);
- if ($setting != PhabricatorPolicies::POLICY_USER) {
- $any_set = true;
- break;
- }
- }
-
- if (!$any_set) {
- return;
- }
-
- $issue_summary = pht(
- 'Maniphest is currently configured with deprecated policy settings '.
- 'which will be removed in a future version of Phabricator.');
-
-
- $message = pht(
- 'Some policy settings in Maniphest are now deprecated and will be '.
- 'removed in a future version of Phabricator. You are currently using '.
- 'at least one of these settings.'.
- "\n\n".
- 'The deprecated settings are "Can Assign Tasks", '.
- '"Can Edit Task Policies", "Can Prioritize Tasks", '.
- '"Can Edit Task Projects", and "Can Edit Task Status". You can '.
- 'find these settings in Applications, or follow the link below.'.
- "\n\n".
- 'You can find discussion of this change (including rationale and '.
- 'recommendations on how to configure similar features) in the upstream, '.
- 'at the link below.'.
- "\n\n".
- 'To resolve this issue, set all of these policies to "All Users" after '.
- 'making any necessary form customization changes.');
-
- $more_href = 'https://secure.phabricator.com/T10003';
- $edit_href = '/applications/view/PhabricatorManiphestApplication/';
-
- $issue = $this->newIssue('maniphest.T10003-per-field-policies')
- ->setShortName(pht('Deprecated Policies'))
- ->setName(pht('Deprecated Maniphest Field Policies'))
- ->setSummary($issue_summary)
- ->setMessage($message)
- ->addLink($more_href, pht('Learn More: Upstream Discussion'))
- ->addLink($edit_href, pht('Edit These Settings'));
- }
-
}
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
@@ -85,11 +85,6 @@
'template' => ManiphestTaskPHIDType::TYPECONST,
'capability' => PhabricatorPolicyCapability::CAN_EDIT,
),
- ManiphestEditStatusCapability::CAPABILITY => array(),
- ManiphestEditAssignCapability::CAPABILITY => array(),
- ManiphestEditPoliciesCapability::CAPABILITY => array(),
- ManiphestEditPriorityCapability::CAPABILITY => array(),
- ManiphestEditProjectsCapability::CAPABILITY => array(),
ManiphestBulkEditCapability::CAPABILITY => array(),
);
}
diff --git a/src/applications/maniphest/capability/ManiphestEditAssignCapability.php b/src/applications/maniphest/capability/ManiphestEditAssignCapability.php
deleted file mode 100644
--- a/src/applications/maniphest/capability/ManiphestEditAssignCapability.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-final class ManiphestEditAssignCapability extends PhabricatorPolicyCapability {
-
- const CAPABILITY = 'maniphest.edit.assign';
-
- public function getCapabilityName() {
- return pht('Can Assign Tasks');
- }
-
- public function describeCapabilityRejection() {
- return pht('You do not have permission to assign tasks.');
- }
-
-}
diff --git a/src/applications/maniphest/capability/ManiphestEditPoliciesCapability.php b/src/applications/maniphest/capability/ManiphestEditPoliciesCapability.php
deleted file mode 100644
--- a/src/applications/maniphest/capability/ManiphestEditPoliciesCapability.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-final class ManiphestEditPoliciesCapability
- extends PhabricatorPolicyCapability {
-
- const CAPABILITY = 'maniphest.edit.policies';
-
- public function getCapabilityName() {
- return pht('Can Edit Task Policies');
- }
-
- public function describeCapabilityRejection() {
- return pht('You do not have permission to edit task policies.');
- }
-
-}
diff --git a/src/applications/maniphest/capability/ManiphestEditPriorityCapability.php b/src/applications/maniphest/capability/ManiphestEditPriorityCapability.php
deleted file mode 100644
--- a/src/applications/maniphest/capability/ManiphestEditPriorityCapability.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-final class ManiphestEditPriorityCapability
- extends PhabricatorPolicyCapability {
-
- const CAPABILITY = 'maniphest.edit.priority';
-
- public function getCapabilityName() {
- return pht('Can Prioritize Tasks');
- }
-
- public function describeCapabilityRejection() {
- return pht('You do not have permission to prioritize tasks.');
- }
-
-}
diff --git a/src/applications/maniphest/capability/ManiphestEditProjectsCapability.php b/src/applications/maniphest/capability/ManiphestEditProjectsCapability.php
deleted file mode 100644
--- a/src/applications/maniphest/capability/ManiphestEditProjectsCapability.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-final class ManiphestEditProjectsCapability
- extends PhabricatorPolicyCapability {
-
- const CAPABILITY = 'maniphest.edit.projects';
-
- public function getCapabilityName() {
- return pht('Can Edit Task Projects');
- }
-
- public function describeCapabilityRejection() {
- return pht('You do not have permission to edit task projects.');
- }
-
-}
diff --git a/src/applications/maniphest/capability/ManiphestEditStatusCapability.php b/src/applications/maniphest/capability/ManiphestEditStatusCapability.php
deleted file mode 100644
--- a/src/applications/maniphest/capability/ManiphestEditStatusCapability.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-final class ManiphestEditStatusCapability extends PhabricatorPolicyCapability {
-
- const CAPABILITY = 'maniphest.edit.status';
-
- public function getCapabilityName() {
- return pht('Can Edit Task Status');
- }
-
- public function describeCapabilityRejection() {
- return pht('You do not have permission to edit task status.');
- }
-
-}
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -279,51 +279,6 @@
->setTask($object);
}
- protected function requireCapabilities(
- PhabricatorLiskDAO $object,
- PhabricatorApplicationTransaction $xaction) {
-
- parent::requireCapabilities($object, $xaction);
-
- $app_capability_map = array(
- ManiphestTaskPriorityTransaction::TRANSACTIONTYPE =>
- ManiphestEditPriorityCapability::CAPABILITY,
- ManiphestTaskStatusTransaction::TRANSACTIONTYPE =>
- ManiphestEditStatusCapability::CAPABILITY,
- ManiphestTaskOwnerTransaction::TRANSACTIONTYPE =>
- ManiphestEditAssignCapability::CAPABILITY,
- PhabricatorTransactions::TYPE_EDIT_POLICY =>
- ManiphestEditPoliciesCapability::CAPABILITY,
- PhabricatorTransactions::TYPE_VIEW_POLICY =>
- ManiphestEditPoliciesCapability::CAPABILITY,
- );
-
-
- $transaction_type = $xaction->getTransactionType();
-
- $app_capability = null;
- if ($transaction_type == PhabricatorTransactions::TYPE_EDGE) {
- switch ($xaction->getMetadataValue('edge:type')) {
- case PhabricatorProjectObjectHasProjectEdgeType::EDGECONST:
- $app_capability = ManiphestEditProjectsCapability::CAPABILITY;
- break;
- }
- } else {
- $app_capability = idx($app_capability_map, $transaction_type);
- }
-
- if ($app_capability) {
- $app = id(new PhabricatorApplicationQuery())
- ->setViewer($this->getActor())
- ->withClasses(array('PhabricatorManiphestApplication'))
- ->executeOne();
- PhabricatorPolicyFilter::requireCapability(
- $this->getActor(),
- $app,
- $app_capability);
- }
- }
-
protected function adjustObjectForPolicyChecks(
PhabricatorLiskDAO $object,
array $xactions) {
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -369,11 +369,7 @@
$can_edit_priority = false;
$can_bulk_edit = false;
} else {
- $can_edit_priority = PhabricatorPolicyFilter::hasCapability(
- $viewer,
- $this->getApplication(),
- ManiphestEditPriorityCapability::CAPABILITY);
-
+ $can_edit_priority = true;
$can_bulk_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$this->getApplication(),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 15 2024, 11:06 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714633
Default Alt Text
D19581.id.diff (11 KB)
Attached To
Mode
D19581: Remove deprecated Maniphest "Can Edit <Specific Property>" capabilities
Attached
Detach File
Event Timeline
Log In to Comment