1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove differential.anonymous-access

Summary:
Fixes T3034. This is obsoleted by modern policies.

This was written by a Facebook intern and is rarely used -- the Hive install might be the only use in the wild. It has never really worked correctly.

Test Plan: `grep`; browsed Differential.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3034

Differential Revision: https://secure.phabricator.com/D7568
This commit is contained in:
epriestley 2013-11-11 16:05:19 -08:00
parent b354ef7aa9
commit c818e6e159
7 changed files with 7 additions and 42 deletions

View file

@ -164,6 +164,9 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
'differential.custom-remarkup-block-rules' => $markup_reason,
'auth.sshkeys.enabled' => pht(
'SSH keys are now actually useful, so they are always enabled.'),
'differential.anonymous-access' => pht(
'Phabricator now has meaningful global access controls. See '.
'`policy.allow-public`.'),
);
return $ancient_config;

View file

@ -6,6 +6,10 @@
final class ConduitAPI_differential_getdiff_Method
extends ConduitAPIMethod {
public function shouldAllowPublic() {
return true;
}
public function getMethodStatus() {
return self::METHOD_STATUS_DEPRECATED;
}
@ -38,10 +42,6 @@ final class ConduitAPI_differential_getdiff_Method
);
}
public function shouldRequireAuthentication() {
return !PhabricatorEnv::getEnvConfig('differential.anonymous-access');
}
protected function execute(ConduitAPIRequest $request) {
$diff_id = $request->getValue('diff_id');

View file

@ -96,18 +96,6 @@ final class PhabricatorDifferentialConfigOptions
'sketchy and implies the revision may not actually be receiving '.
'thorough review. You can enable "!accept" by setting this '.
'option to true.')),
$this->newOption('differential.anonymous-access', 'bool', false)
->setBoolOptions(
array(
pht('Allow guests to view revisions'),
pht('Require authentication to view revisions'),
))
->setSummary(pht('Anonymous access to Differential revisions.'))
->setDescription(
pht(
"If you set this to true, users won't need to login to view ".
"Differential revisions. Anonymous users will have read-only ".
"access and won't be able to interact with the revisions.")),
$this->newOption('differential.generated-paths', 'list<regex>', array())
->setSummary(pht("File regexps to treat as automatically generated."))
->setDescription(

View file

@ -2,14 +2,6 @@
final class DifferentialChangesetViewController extends DifferentialController {
public function shouldRequireLogin() {
if ($this->allowsAnonymousAccess()) {
return false;
}
return parent::shouldRequireLogin();
}
public function shouldAllowPublic() {
return true;
}

View file

@ -2,10 +2,6 @@
abstract class DifferentialController extends PhabricatorController {
protected function allowsAnonymousAccess() {
return PhabricatorEnv::getEnvConfig('differential.anonymous-access');
}
public function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs();

View file

@ -5,13 +5,6 @@ final class DifferentialRevisionListController extends DifferentialController
private $queryKey;
public function shouldRequireLogin() {
if ($this->allowsAnonymousAccess()) {
return false;
}
return parent::shouldRequireLogin();
}
public function shouldAllowPublic() {
return true;
}

View file

@ -4,13 +4,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
private $revisionID;
public function shouldRequireLogin() {
if ($this->allowsAnonymousAccess()) {
return false;
}
return parent::shouldRequireLogin();
}
public function shouldAllowPublic() {
return true;
}