Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F81956
D7568.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D7568.diff
View Options
diff --git a/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php b/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
--- a/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
+++ b/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;
diff --git a/src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php b/src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php
--- a/src/applications/differential/conduit/ConduitAPI_differential_getdiff_Method.php
+++ b/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');
diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
--- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
+++ b/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(
diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/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;
}
diff --git a/src/applications/differential/controller/DifferentialController.php b/src/applications/differential/controller/DifferentialController.php
--- a/src/applications/differential/controller/DifferentialController.php
+++ b/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();
diff --git a/src/applications/differential/controller/DifferentialRevisionListController.php b/src/applications/differential/controller/DifferentialRevisionListController.php
--- a/src/applications/differential/controller/DifferentialRevisionListController.php
+++ b/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;
}
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/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
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ou/ai/jt2zdst4xtw3cpl5
Default Alt Text
D7568.diff (5 KB)
Attached To
Mode
D7568: Remove `differential.anonymous-access`
Attached
Detach File
Event Timeline
Log In to Comment