mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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;
|
||||
$auth_error = null;
|
||||
$conduit_username = '-';
|
||||
if ($method_handler->shouldRequireAuthentication()) {
|
||||
$metadata['scope'] = $method_handler->getRequiredScope();
|
||||
$auth_error = $this->authenticateUser($api_request, $metadata);
|
||||
|
@ -123,15 +124,15 @@ final class PhabricatorConduitAPIController
|
|||
if (isset($metadata['actAsUser'])) {
|
||||
$this->actAsUser($api_request, $metadata['actAsUser']);
|
||||
}
|
||||
}
|
||||
|
||||
$access_log = PhabricatorAccessLog::getLog();
|
||||
if ($access_log) {
|
||||
$conduit_username = '-';
|
||||
$conduit_user = $api_request->getUser();
|
||||
if ($conduit_user && $conduit_user->getPHID()) {
|
||||
$conduit_username = $conduit_user->getUsername();
|
||||
}
|
||||
}
|
||||
|
||||
$access_log = PhabricatorAccessLog::getLog();
|
||||
if ($access_log) {
|
||||
$access_log->setData(
|
||||
array(
|
||||
'u' => $conduit_username,
|
||||
|
|
Loading…
Reference in a new issue