class BankDetailsPermissionRules extends BasePermissionRules {

    @PermissionRule(
            value = "READ",
            description = "Partners can see their own organisations bank details")
    public boolean partnersCanSeeTheirOwnOrganisationsBankDetails(BankDetailsResource bankDetailsResource, UserResource user) {
        return isPartner(bankDetailsResource.getProject(), user.getId()) && partnerBelongsToOrganisation(bankDetailsResource.getProject(), user.getId(), bankDetailsResource.getOrganisation());
    }

}