[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
1 changed files with 2 additions and 5 deletions

View File

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