1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 07:50:57 +01:00

Fix daemon auth issue

Summary: I touched this code recently but it needs an unusual special case because we call through with the "omnipotent user" from the daemons. As per the TODO below, this will all get cleaned up at some point.

Test Plan: Will make @poop verify.

Reviewers: btrahan, poop

Reviewed By: poop

CC: poop, aran

Differential Revision: https://secure.phabricator.com/D7356
This commit is contained in:
epriestley 2013-10-18 18:29:36 -07:00
parent 7e815a06f8
commit 7180199d13
2 changed files with 3 additions and 2 deletions

View file

@ -87,7 +87,8 @@ final class ConduitCall {
$this->request->setUser($user);
if ($this->shouldRequireAuthentication()) {
if (!$user->isLoggedIn()) {
// TODO: As per below, this should get centralized and cleaned up.
if (!$user->isLoggedIn() && !$user->isOmnipotent()) {
throw new ConduitException("ERR-INVALID-AUTH");
}

View file

@ -54,7 +54,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
'corpus' => $message,
'partial' => true,
));
$call->setUser($user);
$call->setUser(PhabricatorUser::getOmnipotentUser());
$result = $call->execute();
$field_values = $result['fields'];