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:
parent
fa2911b2b8
commit
874ae4b7ee
2 changed files with 5 additions and 0 deletions
|
@ -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) {
|
protected function execute(ConduitAPIRequest $request) {
|
||||||
$diff = null;
|
$diff = null;
|
||||||
|
|
||||||
|
|
|
@ -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/conduit/protocol/exception');
|
||||||
phutil_require_module('phabricator', 'applications/differential/storage/diff');
|
phutil_require_module('phabricator', 'applications/differential/storage/diff');
|
||||||
phutil_require_module('phabricator', 'applications/differential/storage/revision');
|
phutil_require_module('phabricator', 'applications/differential/storage/revision');
|
||||||
|
phutil_require_module('phabricator', 'infrastructure/env');
|
||||||
|
|
||||||
phutil_require_module('phutil', 'utils');
|
phutil_require_module('phutil', 'utils');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue