diff --git a/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php b/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php index 2968079017..df9a28d00b 100644 --- a/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php +++ b/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php @@ -43,6 +43,10 @@ class ConduitAPI_differential_getdiff_Method extends ConduitAPIMethod { ); } + public function shouldRequireAuthentication() { + return !PhabricatorEnv::getEnvConfig('differential.anonymous-access'); + } + protected function execute(ConduitAPIRequest $request) { $diff = null; diff --git a/src/applications/conduit/method/differential/getdiff/__init__.php b/src/applications/conduit/method/differential/getdiff/__init__.php index 15399190d3..ee5f6cc825 100644 --- a/src/applications/conduit/method/differential/getdiff/__init__.php +++ b/src/applications/conduit/method/differential/getdiff/__init__.php @@ -10,6 +10,7 @@ phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phutil', 'utils');