diff --git a/Classes/Slot/AddCustomGroupsSlot.php b/Classes/Slot/AddCustomGroupsSlot.php new file mode 100644 index 0000000..540e02e --- /dev/null +++ b/Classes/Slot/AddCustomGroupsSlot.php @@ -0,0 +1,26 @@ +get(FeGroupsRepository::class); + $feGroups = $feGroupsRepository->findByCurrentIpAddress(); + + + + $customGroups = []; + foreach ($feGroups as $feGroup) { + $customGroups[] = $feGroup['uid']; + } + + $checkPermissions->addCustomGroups($customGroups); + } +} diff --git a/ext_localconf.php b/ext_localconf.php index 9a28328..ec079ab 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -17,3 +17,14 @@ defined('TYPO3_MODE') || die(); 'className' => \In2code\In2frontendauthentication\Domain\Service\AuthenticationService::class, ] ); + +/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */ +$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher'); +$signalSlotDispatcher->connect( + \BeechIt\FalSecuredownload\Security\CheckPermissions::class, + 'AddCustomGroups', + \In2code\In2frontendauthentication\Slot\AddCustomGroupsSlot::class, + 'addCustomGroups' +); + +