mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +01:00
Remove pointless requireCapabilities() method from PhabricatorRepositoryEditor
Summary: Depends on D19582. Ref T13164. It's not possible to reach the editor without passing through a CAN_EDIT check, and it shouldn't be necessarily to manually specify that edits require CAN_EDIT by default. Test Plan: Grepped for `RepositoryEditor`, verified that all callsites pass through a CAN_EDIT check. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13164 Differential Revision: https://secure.phabricator.com/D19583
This commit is contained in:
parent
a39852ae1b
commit
24d4445845
1 changed files with 0 additions and 34 deletions
|
@ -236,40 +236,6 @@ final class PhabricatorRepositoryEditor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function requireCapabilities(
|
|
||||||
PhabricatorLiskDAO $object,
|
|
||||||
PhabricatorApplicationTransaction $xaction) {
|
|
||||||
|
|
||||||
switch ($xaction->getTransactionType()) {
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_ACTIVATE:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_NAME:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_DESCRIPTION:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_ENCODING:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_DEFAULT_BRANCH:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_TRACK_ONLY:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_AUTOCLOSE_ONLY:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_UUID:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_SVN_SUBPATH:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_VCS:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_NOTIFY:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_AUTOCLOSE:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_PUSH_POLICY:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_DANGEROUS:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_ENORMOUS:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_SLUG:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_SERVICE:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_SYMBOLS_SOURCES:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_SYMBOLS_LANGUAGE:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_STAGING_URI:
|
|
||||||
case PhabricatorRepositoryTransaction::TYPE_AUTOMATION_BLUEPRINTS:
|
|
||||||
PhabricatorPolicyFilter::requireCapability(
|
|
||||||
$this->requireActor(),
|
|
||||||
$object,
|
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function validateTransaction(
|
protected function validateTransaction(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
$type,
|
$type,
|
||||||
|
|
Loading…
Reference in a new issue