diff --git a/src/main/java/nl/tudelft/tam/security/AuthorisationService.java b/src/main/java/nl/tudelft/tam/security/AuthorisationService.java index 00a07c14ebbef18463d233601dcbf1767e72901b..8bc84a2cbda9373dbc780cde94ea591491a91ac4 100644 --- a/src/main/java/nl/tudelft/tam/security/AuthorisationService.java +++ b/src/main/java/nl/tudelft/tam/security/AuthorisationService.java @@ -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())); } diff --git a/src/main/resources/templates/job_offer/apply.html b/src/main/resources/templates/job_offer/apply.html index 6f52595b019c1021e845bec70ef54ce18c3db4b4..a5d76d06e6bc1e10d50d4561ac24fac0a387c61c 100644 --- a/src/main/resources/templates/job_offer/apply.html +++ b/src/main/resources/templates/job_offer/apply.html @@ -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}"