class GrantOfferLetterPermissionRules extends BasePermissionRules {

    @PermissionRule(
            value = "DOWNLOAD_GRANT_OFFER",
            description = "Innovation lead users can download grant offer documents (Unsigned grant offer, signed grant offer, Additional contract), of projects from competition assigned to them")
    public boolean innovationLeadUsersCanDownloadGrantOfferLetter(ProjectResource project, UserResource user) {
        Application application = applicationRepository.findById(project.getApplication()).get();
        return userIsInnovationLeadOnCompetition(application.getCompetition().getId(), user.getId());
    }

}