mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Minor, fix access log issue with non-auth methods.
This commit is contained in:
parent
07d8503647
commit
2909f0b06f
1 changed files with 5 additions and 4 deletions
|
@ -113,6 +113,7 @@ final class PhabricatorConduitAPIController
|
||||||
|
|
||||||
$allow_unguarded_writes = false;
|
$allow_unguarded_writes = false;
|
||||||
$auth_error = null;
|
$auth_error = null;
|
||||||
|
$conduit_username = '-';
|
||||||
if ($method_handler->shouldRequireAuthentication()) {
|
if ($method_handler->shouldRequireAuthentication()) {
|
||||||
$metadata['scope'] = $method_handler->getRequiredScope();
|
$metadata['scope'] = $method_handler->getRequiredScope();
|
||||||
$auth_error = $this->authenticateUser($api_request, $metadata);
|
$auth_error = $this->authenticateUser($api_request, $metadata);
|
||||||
|
@ -123,15 +124,15 @@ final class PhabricatorConduitAPIController
|
||||||
if (isset($metadata['actAsUser'])) {
|
if (isset($metadata['actAsUser'])) {
|
||||||
$this->actAsUser($api_request, $metadata['actAsUser']);
|
$this->actAsUser($api_request, $metadata['actAsUser']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$access_log = PhabricatorAccessLog::getLog();
|
|
||||||
if ($access_log) {
|
|
||||||
$conduit_username = '-';
|
|
||||||
$conduit_user = $api_request->getUser();
|
$conduit_user = $api_request->getUser();
|
||||||
if ($conduit_user && $conduit_user->getPHID()) {
|
if ($conduit_user && $conduit_user->getPHID()) {
|
||||||
$conduit_username = $conduit_user->getUsername();
|
$conduit_username = $conduit_user->getUsername();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$access_log = PhabricatorAccessLog::getLog();
|
||||||
|
if ($access_log) {
|
||||||
$access_log->setData(
|
$access_log->setData(
|
||||||
array(
|
array(
|
||||||
'u' => $conduit_username,
|
'u' => $conduit_username,
|
||||||
|
|
Loading…
Reference in a new issue