fix: properly forward return urls where missing
This commit is contained in:
1 parent
102e1c1c3c
commit
48cd2d6b67
27 files changed
+194
-24
No files matched your search
@@ -24,7 +24,13 @@ class InfoController extends AbstractController
|
||||
#[IsGranted(new Expression('is_granted("ROLE_ADMINISTRATIVE") or is_granted("ROLE_HOUSE_MANAGER")'))]
|
||||
public function index(Teamer $teamer, Request $request): Response
|
||||
{
|
||||
$returnUrl = $this->getReturnUrl($request, 'app_administrative_assignment_index');
|
||||
// House managers reach this modal but not the administrative overviews,
|
||||
// so their fallback has to stay inside their own area.
|
||||
$defaultReturnUrlRoute = $this->isGranted('ROLE_ADMINISTRATIVE')
|
||||
? 'app_administrative_assignment_index'
|
||||
: 'app_house_manager_index';
|
||||
|
||||
$returnUrl = $this->getReturnUrl($request, $defaultReturnUrlRoute);
|
||||
|
||||
$recentDispositions = $this->dispositionRepository->findRecentDispositionsByTeamer($teamer);
|
||||
|
||||
|
||||
Reference in new issue
Block a user