Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14051184
D7568.diff
No One
Temporary
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
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 10:51 PM (4 d, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717708
Default Alt Text
D7568.diff (5 KB)
Attached To
Mode
D7568: Remove `differential.anonymous-access`
Attached
Detach File
Event Timeline
Log In to Comment