N°6022 - Make synchro scripts work by http via token authentication with SYNCHRO scopes

This commit is contained in:
odain
2023-02-23 16:29:45 +01:00
parent b174e4cab3
commit 939771aa15
2 changed files with 9 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ function UsageAndExit($oP)
}
else
{
$oP->p("The parameter 'data_sources' is mandatory, and must contain a comma separated list of data sources\n");
$oP->p("The parameter 'data_sources' is mandatory, and must contain a comma separated list of data sources\n");
}
$oP->output();
exit -2;
@@ -105,6 +105,9 @@ if (utils::IsModeCLI())
else
{
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
//N°6022 - Make synchro scripts work by http via token authentication with SYNCHRO scopes
$oCtx = new ContextTag(ContextTag::TAG_SYNCHRO);
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
}
@@ -166,7 +169,7 @@ foreach(explode(',', $sDataSourcesList) as $iSDS)
}
catch(Exception $e)
{
$oP->add($e->getMessage());
$oP->add($e->getMessage());
if ($bSimulate)
{
CMDBSource::Query('ROLLBACK');