1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

Remove Differential "View Policy" field

Summary: Ref T11114. Obsoleted by EditEngine.

Test Plan: Edited the view policy of a revision.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17082
This commit is contained in:
epriestley 2016-12-16 09:19:55 -08:00
parent 84572a3b93
commit f552a20c61
3 changed files with 0 additions and 53 deletions

View file

@ -582,7 +582,6 @@ phutil_register_library_map(array(
'DifferentialUnitStatus' => 'applications/differential/constants/DifferentialUnitStatus.php',
'DifferentialUnitTestResult' => 'applications/differential/constants/DifferentialUnitTestResult.php',
'DifferentialUpdateRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php',
'DifferentialViewPolicyField' => 'applications/differential/customfield/DifferentialViewPolicyField.php',
'DiffusionAuditorDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorDatasource.php',
'DiffusionAuditorFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorFunctionDatasource.php',
'DiffusionAuditorsAddAuditorsHeraldAction' => 'applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php',
@ -5247,7 +5246,6 @@ phutil_register_library_map(array(
'DifferentialUnitStatus' => 'Phobject',
'DifferentialUnitTestResult' => 'Phobject',
'DifferentialUpdateRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialViewPolicyField' => 'DifferentialCoreCustomField',
'DiffusionAuditorDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'DiffusionAuditorFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'DiffusionAuditorsAddAuditorsHeraldAction' => 'DiffusionAuditorsHeraldAction',

View file

@ -31,7 +31,6 @@ final class PhabricatorDifferentialConfigOptions
new DifferentialReviewersField(),
new DifferentialProjectReviewersField(),
new DifferentialRepositoryField(),
new DifferentialViewPolicyField(),
new DifferentialManiphestTasksField(),
new DifferentialCommitsField(),

View file

@ -1,50 +0,0 @@
<?php
final class DifferentialViewPolicyField
extends DifferentialCoreCustomField {
public function getFieldKey() {
return 'differential:view-policy';
}
public function getFieldName() {
return pht('View Policy');
}
public function getFieldDescription() {
return pht('Controls visibility.');
}
protected function readValueFromRevision(
DifferentialRevision $revision) {
return $revision->getViewPolicy();
}
public function readValueFromRequest(AphrontRequest $request) {
$this->setValue($request->getStr($this->getFieldKey()));
}
public function renderEditControl(array $handles) {
$viewer = $this->getViewer();
$revision = $this->getObject();
$policies = id(new PhabricatorPolicyQuery())
->setViewer($viewer)
->setObject($revision)
->execute();
return id(new AphrontFormPolicyControl())
->setUser($viewer)
->setCapability(PhabricatorPolicyCapability::CAN_VIEW)
->setPolicyObject($revision)
->setPolicies($policies)
->setName($this->getFieldKey())
->setValue($this->getValue())
->setError($this->getFieldError());
}
public function getApplicationTransactionType() {
return PhabricatorTransactions::TYPE_VIEW_POLICY;
}
}