ext_localconf.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. if (!defined('TYPO3_MODE')) {
  3. die('Access denied.');
  4. }
  5. $GLOBALS['TYPO3_CONF_VARS']['LOG']['Opentalent']['OtCore']['writerConfiguration'] = [
  6. // configuration for DEBUG level log entries
  7. TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
  8. // add a FileWriter
  9. TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
  10. // configuration for the writer
  11. 'logFile' => TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/ot_typo3.log'
  12. ]
  13. ],
  14. TYPO3\CMS\Core\Log\LogLevel::WARNING => [
  15. // add a DatabaseWriter
  16. TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
  17. 'logTable' => 'ot_log'
  18. ]
  19. ]
  20. ];
  21. // Because of this issue https://forge.typo3.org/issues/89449,
  22. // we have to xclass the BackendUserAuthenticator backend middleware
  23. // to allow public routes to be really public
  24. $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator::class] = [
  25. 'className' => Opentalent\OtCore\Middleware\OtBackendUserAuthenticator::class
  26. ];
  27. $GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['Controller/NewsController.php']['createDemandObjectFromSettings'] = ['Opentalent\OtTemplating\News\NewsFilter->createDemandObjectFromSettings'];
  28. // ** Opentalent environment variables **
  29. // An array containing all or part of these variables could have been set before, for example
  30. // in the AdditionalConfiguration.php file.
  31. // In this case we merge them so that the pre-defined vars are not overridden.
  32. // (/!\ do not forget to clear the cache after any update here)
  33. $GLOBALS['OT'] = array_merge([
  34. 'API_BASE_URI' => 'https://api.opentalent.fr',
  35. 'DB_HOST' => 'prod-back',
  36. 'DB_USER' => 'dbcloner',
  37. 'DB_PASSWORD' => 'wWZ4hYcrmHLW2mUK',
  38. 'FRAMES_BASE_URI' => 'https://frames.opentalent.fr',
  39. 'WEBSITE' => 'https://opentalent.fr',
  40. 'DASHBOARD_URL' => 'https://admin.opentalent.fr/#/dashboard',
  41. 'LOGIN_PAGE_URL' => 'https://admin.opentalent.fr/#/login',
  42. 'FILE_STORAGE_URL' => 'https://api.opentalent.fr/app.php/_internal/secure/files/'
  43. ], ($GLOBALS['OT'] ?? []));