Page MenuHomePhabricator

D7568.id.diff
No OneTemporary

D7568.id.diff

Index: src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
===================================================================
--- src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
+++ src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
@@ -164,6 +164,9 @@
'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;
Index: src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php
===================================================================
--- src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php
+++ src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php
@@ -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 @@
);
}
- public function shouldRequireAuthentication() {
- return !PhabricatorEnv::getEnvConfig('differential.anonymous-access');
- }
-
protected function execute(ConduitAPIRequest $request) {
$diff_id = $request->getValue('diff_id');
Index: src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
===================================================================
--- src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
+++ src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
@@ -96,18 +96,6 @@
'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(
Index: src/applications/differential/controller/DifferentialChangesetViewController.php
===================================================================
--- src/applications/differential/controller/DifferentialChangesetViewController.php
+++ src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -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;
}
Index: src/applications/differential/controller/DifferentialController.php
===================================================================
--- src/applications/differential/controller/DifferentialController.php
+++ src/applications/differential/controller/DifferentialController.php
@@ -2,10 +2,6 @@
abstract class DifferentialController extends PhabricatorController {
- protected function allowsAnonymousAccess() {
- return PhabricatorEnv::getEnvConfig('differential.anonymous-access');
- }
-
public function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs();
Index: src/applications/differential/controller/DifferentialRevisionListController.php
===================================================================
--- src/applications/differential/controller/DifferentialRevisionListController.php
+++ src/applications/differential/controller/DifferentialRevisionListController.php
@@ -5,13 +5,6 @@
private $queryKey;
- public function shouldRequireLogin() {
- if ($this->allowsAnonymousAccess()) {
- return false;
- }
- return parent::shouldRequireLogin();
- }
-
public function shouldAllowPublic() {
return true;
}
Index: src/applications/differential/controller/DifferentialRevisionViewController.php
===================================================================
--- src/applications/differential/controller/DifferentialRevisionViewController.php
+++ src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -4,13 +4,6 @@
private $revisionID;
- public function shouldRequireLogin() {
- if ($this->allowsAnonymousAccess()) {
- return false;
- }
- return parent::shouldRequireLogin();
- }
-
public function shouldAllowPublic() {
return true;
}

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 6:28 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717708
Default Alt Text
D7568.id.diff (5 KB)

Event Timeline