class ApplicationFinancePermissionRules extends BasePermissionRules {

    @PermissionRule(value = "READ", description = "Stakeholders can see application finances for organisations on applications they are assigned to")
    public boolean stakeholdersCanSeeApplicationFinancesForOrganisations(final ApplicationFinanceResource applicationFinanceResource, final UserResource user) {
        Application application = applicationRepository.findById(applicationFinanceResource.getApplication()).get();
        return userIsStakeholderInCompetition(application.getCompetition().getId(), user.getId());
    }

}