Skip to content
Snippets Groups Projects

Redirect to job offers on login

All threads resolved!

Files

@@ -94,6 +94,22 @@ public class JobOfferController {
// region view pages
/**
* Redirects users to the correct starting page based on their roles.
*
* @return The redirected page (either open or manage)
*/
@GetMapping
public String jobOffersRedirect() {
if (authorisationService.isStaff()) {
// Redirect to All Applications
return "redirect:/job-offer/manage";
} else {
// Redirect to Job Offers
return "redirect:/job-offer/open";
}
}
@GetMapping("open")
public String getOpenJobOffers(@AuthenticatedPerson Person person,
@RequestParam(required = false) String q, Model model) {
Loading