Skip to content
Snippets Groups Projects

Deploy fix

86 files
+ 760
288
Compare changes
  • Side-by-side
  • Inline

Files

@@ -141,7 +141,7 @@ public class ApplicationController {
* @return The job offer page (i.e. from where the promotion was made)
*/
@PostMapping("promote/{personId}/{offerId}")
@PreAuthorize("@authorisationService.isManagerOfAny()")
@PreAuthorize("@authorisationService.isManagerOfJob(#offerId)")
public String promote(@PathVariable Long personId, @PathVariable Long offerId) {
applicationService.promote(personId, offerId);
return "redirect:/job-offer/" + offerId;
@@ -155,7 +155,7 @@ public class ApplicationController {
* @return The job offer page (i.e. from where the action was taken to change)
*/
@PostMapping("demote/{personId}/{offerId}")
@PreAuthorize("@authorisationService.isManagerOfAny()")
@PreAuthorize("@authorisationService.isManagerOfJob(#offerId)")
public String demote(@PathVariable Long personId, @PathVariable Long offerId) {
applicationService.demote(personId, offerId);
return "redirect:/job-offer/" + offerId;
@@ -170,6 +170,7 @@ public class ApplicationController {
* @return The page to redirect the user to (either my applications or previous is provided)
*/
@PostMapping("submit")
@PreAuthorize("@authorisationService.canSubmitApplication(#create.jobOffer.id)")
public String submitApplication(@AuthenticatedPerson Person person, ApplicationCreateDTO create,
@RequestParam(required = false) String page, @RequestParam(required = false) Long program) {
applicationService.submit(person.getId(), create);
@@ -243,7 +244,7 @@ public class ApplicationController {
* @return The job offer page (ie. from where the offer was made)
*/
@PostMapping("offer/{personId}/{offerId}")
@PreAuthorize("@authorisationService.isManagerOfAny()")
@PreAuthorize("@authorisationService.isManagerOfJob(#offerId)")
public String offerApplication(@AuthenticatedPerson Person person, @PathVariable Long personId,
@PathVariable Long offerId) {
applicationService.offer(personId, offerId, person.getId());
Loading