class GrantOfferLetterPermissionRules extends BasePermissionRules {

    @PermissionRule(
            value = "VIEW_GRANT_OFFER",
            description = "Stakeholders can view grant offer documents (Unsigned grant offer, signed grant offer, Additional contract), of projects from competition assigned to them")
    public boolean stakeholdersCanViewGrantOfferLetter(ProjectResource project, UserResource user) {
        Application application = applicationRepository.findById(project.getApplication()).get();
        return userIsStakeholderInCompetition(application.getCompetition().getId(), user.getId());
    }

}