1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Allow anonymous access to conduit getdiff method.

Summary:
Allow anonymous access to conduit getdiff method, which is needed for anonymous
`arc patch`.

Test Plan: Running getdiff with an unauthenticated conduit should work.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1068
This commit is contained in:
Marek Sapota 2011-11-01 12:31:51 -07:00
parent fa2911b2b8
commit 874ae4b7ee
2 changed files with 5 additions and 0 deletions

View file

@ -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;

View file

@ -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');