Skip to content
Snippets Groups Projects
Commit 816ef9b3 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #12346 TIME 0:15 get external connections enabled

parent affde58c
No related branches found
No related tags found
No related merge requests found
...@@ -522,5 +522,6 @@ $app->get('/maarchParapheur/user/{id}/picture', \ExternalSignatoryBook\controlle ...@@ -522,5 +522,6 @@ $app->get('/maarchParapheur/user/{id}/picture', \ExternalSignatoryBook\controlle
$app->get('/externalSignatureBooks/enabled', \ExternalSignatoryBook\controllers\ExternalSignatureBookController::class . ':getEnabledSignatureBook'); $app->get('/externalSignatureBooks/enabled', \ExternalSignatoryBook\controllers\ExternalSignatureBookController::class . ':getEnabledSignatureBook');
$app->get('/externalSummary/{resId}', \ExternalSummary\controllers\SummaryController::class . ':getByResId'); $app->get('/externalSummary/{resId}', \ExternalSummary\controllers\SummaryController::class . ':getByResId');
$app->get('/externalConnectionsEnabled', \SrcCore\controllers\CoreController::class . ':externalConnectionsEnabled');
$app->run(); $app->run();
...@@ -98,4 +98,19 @@ class CoreController ...@@ -98,4 +98,19 @@ class CoreController
$GLOBALS['userId'] = $args['login']; $GLOBALS['userId'] = $args['login'];
$GLOBALS['id'] = $user['id']; $GLOBALS['id'] = $user['id'];
} }
public function externalConnectionsEnabled(Request $request, Response $response)
{
$connections = [];
$loadedXml = CoreConfigModel::getXmlLoaded(['path' => 'modules/visa/xml/remoteSignatoryBooks.xml']);
if (!empty($loadedXml->signatoryBookEnabled)) {
$connections[(string)$loadedXml->signatoryBookEnabled] = true;
}
$mailevaConfig = CoreConfigModel::getMailevaConfiguration();
if ($mailevaConfig['enabled']) {
$connections['maileva'] = true;
}
return $response->withJson(['connection' => $connections]);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment