Skip to content

Commit

Permalink
[TASK] Add TODOs for later changes on error handlig
Browse files Browse the repository at this point in the history
  • Loading branch information
dot3media committed Feb 15, 2024
1 parent 273b3be commit 91e2ea0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Controller/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function showProfileSwitchAction(): ResponseInterface
{
$profileUids = $this->context->getPropertyFromAspect('frontend.profile', 'allProfileUids', []);

// TODO: Don't return empty response if no profiles are assigned to user
if (empty($profileUids)) {
return $this->htmlResponse();
}
Expand Down Expand Up @@ -135,6 +136,8 @@ public function showProfileEditingFormAction(Profile $profile = null): ResponseI
}

$profileUids = $this->context->getPropertyFromAspect('frontend.profile', 'allProfileUids', []);

// TODO: To die() is no good way out here, talk to your trusted TYPO3 developer first
if ($profile === null || !in_array($profile->getUid(), $profileUids)) {
GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction(
$this->request,
Expand Down

0 comments on commit 91e2ea0

Please sign in to comment.