[TASK] Return the new group(s) explicitly

The signal in fal_secureddownload changed slightly. It requires now,
that the new groups are returned by value, instead of modifing the
object directly.
This commit is contained in:
Marcus Schwemer 2017-07-17 10:55:16 +02:00
parent a022a29b47
commit b3edef4a59

View file

@ -8,19 +8,16 @@ use In2code\In2frontendauthentication\Domain\Repository\FeGroupsRepository;
class AddCustomGroupsSlot class AddCustomGroupsSlot
{ {
public function addCustomGroups($checkPermissions) public function addCustomGroups($customGroups)
{ {
$feGroupsRepository = GeneralUtility::makeInstance(ObjectManager::class) $feGroupsRepository = GeneralUtility::makeInstance(ObjectManager::class)
->get(FeGroupsRepository::class); ->get(FeGroupsRepository::class);
$feGroups = $feGroupsRepository->findByCurrentIpAddress(); $feGroups = $feGroupsRepository->findByCurrentIpAddress();
$customGroups = [];
foreach ($feGroups as $feGroup) { foreach ($feGroups as $feGroup) {
$customGroups[] = $feGroup['uid']; $customGroups[] = $feGroup['uid'];
} }
$checkPermissions->addCustomGroups($customGroups); return array($customGroups);
} }
} }