Skip to content
Snippets Groups Projects
Commit 71abd5eb authored by Timur Oberhuber's avatar Timur Oberhuber :speech_balloon:
Browse files

Merge branch '43-redirect-to-job-offers-on-login' into 'dev'

Redirect to job offers on login

Closes #43

See merge request eip/labrador/tam/tam!181
parents f76b5d66 08174314
No related branches found
No related tags found
No related merge requests found
Pipeline #729380 passed
......@@ -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) {
......
......
......@@ -68,7 +68,7 @@ labrador:
saved-request-aware: true
# This field holds the url that the user is redirected to after successful login as well as after the logout.
# Therefore, check if a url is accessible without authentication before setting it to be the success-url.
success-url: /profile
success-url: /job-offer
# For the SAML security configurations, we refer to documentation here:
# https://github.com/ulisesbocchio/spring-boot-security-saml
......
......
......@@ -64,4 +64,4 @@ labrador:
saved-request-aware: true
# This field holds the url that the user is redirected to after successful login as well as after the logout.
# Therefore, check if a url is accessible without authentication before setting it to be the success-url.
success-url: /profile
\ No newline at end of file
success-url: /job-offer
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment