Skip to content
Snippets Groups Projects
Commit aa918828 authored by Danae Savvidi's avatar Danae Savvidi :laughing:
Browse files

fix authorization in apply button

parent 4d2ec002
Branches
Tags
2 merge requests!414Deploy 2.2.5,!408Resolve "Instructor can apply to own job offer"
Pipeline #1226508 passed
......@@ -242,6 +242,7 @@ public class AuthorisationService {
JobOffer jobOffer = jobOfferService.findByIdOrThrow(offerId);
return !applicationService.appExistsFor(getAuthPerson().getId(), offerId) &&
!jobOffer.getHidden() &&
!canManageEdition(jobOffer.getEditionId()) &&
(jobOffer.getDeadline() == null || !LocalDate.now().isAfter(jobOffer.getDeadline()));
}
......
......@@ -78,7 +78,7 @@
th:text="#{general.close}"
data-cancel></button>
<button
th:unless="${app.exists()}"
th:unless="${app.exists() || !@authorisationService.canSubmitApplication(offer.id)}"
type="submit"
class="button p-less"
th:aria-label="#{jobOffer.apply}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment