To do this, you must first provide READ access to the Person's own company using
rule readCompany {
description: "Allow Read Access to Person's Own Company"
participant(p): "org.acme.shipping.participants.Person"
operation: READ
resource(comp): "org.acme.shipping.participants.Company"
condition: (p.company.getIdentifier() == comp.getIdentifier())
action: ALLOW
}
Then can grant access to all the containers to the persons belonging to company of type Border using your same rule as
rule border {
description: "Allow Border access to containers"
participant(p): "org.acme.shipping.participants.Person"
operation: READ
resource: "org.acme.shipping.assets.**"
condition: (p.company.type == "BORDER")
action: ALLOW
}