fix: revoke removal of return url to avoid 'access denied' errors
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller\Common;
|
||||
|
||||
use App\Controller\Traits\ReturnUrlTrait;
|
||||
use App\Form\AssignmentFilterType;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
use App\Repository\AssignmentRepository;
|
||||
@@ -14,6 +15,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class AssignmentFilterController extends AbstractController
|
||||
{
|
||||
use ReturnUrlTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly AssignmentFilterHandler $filterHandler,
|
||||
private readonly AssignmentRepository $assignmentRepository
|
||||
@@ -37,7 +40,7 @@ class AssignmentFilterController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->filterHandler->handleRequest($form);
|
||||
$returnUrl = $this->generateUrl('app_administrative_assignment_index');
|
||||
$returnUrl = $this->getReturnUrl($request, 'app_administrative_assignment_index');
|
||||
|
||||
return new HxRedirectResponse($returnUrl);
|
||||
}
|
||||
@@ -52,7 +55,7 @@ class AssignmentFilterController extends AbstractController
|
||||
public function reset(Request $request): Response
|
||||
{
|
||||
$this->filterHandler->resetFilterSettings();
|
||||
$returnUrl = $this->generateUrl('app_administrative_assignment_index');
|
||||
$returnUrl = $this->getReturnUrl($request, 'app_administrative_assignment_index');
|
||||
|
||||
return $this->redirect($returnUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user