class SpendProfilePermissionRules extends BasePermissionRules {

    @PermissionRule(
            value = "VIEW_SPEND_PROFILE_CSV",
            description = "Stakeholders can view Spend Profile data for project on competition assigned to them")
    public boolean stakeholdersCanSeeSpendProfileCsv(ProjectOrganisationCompositeId projectOrganisationCompositeId, UserResource user) {
        Project project = projectRepository.findById(projectOrganisationCompositeId.getProjectId()).get();
        return userIsStakeholderInCompetition(project.getApplication().getCompetition().getId(), user.getId());
    }

}