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:
parent
7e815a06f8
commit
7180199d13
2 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue