class ProjectDetailsPermissionRules extends BasePermissionRules {

    @PermissionRule(
            value = "UPDATE_FINANCE_CONTACT",
            description = "A partner can update the finance contact for their own organisation")
    public boolean partnersCanUpdateTheirOwnOrganisationsFinanceContacts(ProjectOrganisationCompositeId composite, UserResource user) {
        return isPartner(composite.getProjectId(), user.getId()) &&
                isProjectActive(composite.getProjectId()) &&
                partnerBelongsToOrganisation(composite.getProjectId(), user.getId(), composite.getOrganisationId());
    }

}