1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Merge branch 'differential.find'

This commit is contained in:
epriestley 2011-02-10 16:15:31 -08:00
commit 175884e5d2
2 changed files with 7 additions and 4 deletions

View file

@ -81,7 +81,11 @@ class PhabricatorConduitAPIController
$api_request = new ConduitAPIRequest($params);
if ($method_handler->shouldRequireAuthentication()) {
if ($request->getUser()->getPHID()) {
$auth_okay = true;
} else if (!$method_handler->shouldRequireAuthentication()) {
$auth_okay = true;
} else {
$session_key = idx($metadata, 'sessionKey');
if (!$session_key) {
$auth_okay = false;
@ -97,6 +101,7 @@ class PhabricatorConduitAPIController
$session_key);
if (!$session) {
$auth_okay = false;
$result = null;
$error_code = 'ERR-INVALID-SESSION';
$error_info = 'Session key is invalid.';
} else {
@ -105,8 +110,6 @@ class PhabricatorConduitAPIController
}
}
// TODO: When we session, read connectionID from the session table.
} else {
$auth_okay = true;
}
if ($auth_okay) {

View file

@ -27,7 +27,7 @@ class ConduitAPI_differential_find_Method extends ConduitAPIMethod {
DifferentialRevisionListData::QUERY_OPEN_OWNED,
DifferentialRevisionListData::QUERY_COMMITTABLE,
DifferentialRevisionListData::QUERY_REVISION_IDS,
DifferentialRevisionListData::QUERY_BY_PHID,
DifferentialRevisionListData::QUERY_PHIDS,
);
$types = implode(', ', $types);