I am implementing a TYPO3 plugin with actions in an ActionController class.
However, the ActionController base class seems to enforce authentication.
In my use case, I, however, do not want authentication, since that particular controller renders a page that should be publicly accessible.
How can I deactivate authentication in such a controller?
<?php
namespace HomeinfoSysMon2Controller;
use TYPO3CMSCoreUtilityGeneralUtility;
use TYPO3CMSExtbaseMvcControllerActionController;
use TYPO3CMSExtbaseObjectObjectManager;
use TYPO3CMSExtbaseUtilityDebuggerUtility;
use TYPO3CMSCoreDatabaseConnectionPool;
use Generator;
use HomeinfohwdbDomainModelDeployment;
use HomeinfohwdbDomainRepositoryDeploymentRepository;
use HomeinfohwdbDomainRepositorySystemRepository;
use HomeinfoSysMon2DomainRepositoryCheckResultsRepository;
use HomeinfoSysMon2SystemWithCheckResults;
class UnauthenticatedAccess extends ActionController
{
public function systemDetailsAction()
{
//$customerId = $this->request->getArgument('customer');
$customerId = 1030020;
$deploymentRepository = GeneralUtility::makeInstance(ObjectManager::class)
->get(DeploymentRepository::class);
$deployments = iterator_to_array($deploymentRepository->findByCustomerId($customerId));
$systemRepository = GeneralUtility::makeInstance(ObjectManager::class)
->get(SystemRepository::class);
$deploymentIds = [];
foreach ($deployments as &$deployment)
$deploymentIds[] = $deployment->id;
$systems = iterator_to_array($systemRepository->findByDeploymentIds($deploymentIds));
$checkResultsRepository = GeneralUtility::makeInstance(ObjectManager::class)
->get(CheckResultsRepository::class);
$systemIds = [];
foreach ($systems as $system)
$systemIds[] = $system->id;
$checkResults = iterator_to_array($checkResultsRepository->findLastMonthBySystems($systemIds));
$systemsWithCheckResults = iterator_to_array(
SystemWithCheckResults::fromSystemsDeploymentsAndCheckResults($systems, $deployments, $checkResults)
);
$this->view->assign('systemsWithCheckResults', $systemsWithCheckResults);
}
}