mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
Protect the webservices...
SVN:trunk[2382]
This commit is contained in:
@@ -107,6 +107,13 @@ class BasicServices extends WebServicesBase
|
||||
}
|
||||
UserRights::Login($sLogin);
|
||||
|
||||
if (!class_exists('Incident'))
|
||||
{
|
||||
$oRes = new WebServiceResult();
|
||||
$oRes->LogError("The class Incident does not exist. Did you install the Incident Management (ITIL) module ?");
|
||||
return $oRes;
|
||||
}
|
||||
|
||||
$aCallerDesc = self::SoapStructToExternalKeySearch($oCallerDesc);
|
||||
$aCustomerDesc = self::SoapStructToExternalKeySearch($oCustomerDesc);
|
||||
$aServiceDesc = self::SoapStructToExternalKeySearch($oServiceDesc);
|
||||
|
||||
@@ -284,10 +284,10 @@ abstract class WebServicesBase
|
||||
$oLog->Set('userinfo', UserRights::GetUser());
|
||||
$oLog->Set('verb', $sVerb);
|
||||
$oLog->Set('result', $oRes->IsOk());
|
||||
$this->TrimAndSetValue($oLog, 'log_info', $oRes->GetInfoAsText());
|
||||
$this->TrimAndSetValue($oLog, 'log_warning', $oRes->GetWarningsAsText());
|
||||
$this->TrimAndSetValue($oLog, 'log_error', $oRes->GetErrorsAsText());
|
||||
$this->TrimAndSetValue($oLog, 'data', $oRes->GetReturnedDataAsText());
|
||||
$this->TrimAndSetValue($oLog, 'log_info', (string)$oRes->GetInfoAsText());
|
||||
$this->TrimAndSetValue($oLog, 'log_warning', (string)$oRes->GetWarningsAsText());
|
||||
$this->TrimAndSetValue($oLog, 'log_error', (string)$oRes->GetErrorsAsText());
|
||||
$this->TrimAndSetValue($oLog, 'data', (string)$oRes->GetReturnedDataAsText());
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user