diff --git a/src/main/resources/rego/odrl/operator.rego b/src/main/resources/rego/odrl/operator.rego index 4c84c86..3d7a83e 100644 --- a/src/main/resources/rego/odrl/operator.rego +++ b/src/main/resources/rego/odrl/operator.rego @@ -4,15 +4,15 @@ import rego.v1 ## odrl:eq # check that both operands are equal -eq_operator(leftOperand, rightOperand) if { - print(leftOperand) - print(rightOperand) - leftOperand == rightOperand -} +eq_operator(leftOperand, rightOperand) if leftOperand == rightOperand ## odrl:hasPart # check that the rightOperand is in the leftOperand -has_part_operator(leftOperand, rightOperand) if rightOperand in leftOperand +has_part_operator(leftOperand, rightOperand) if { + print(leftOperand) + print(rightOperand) + rightOperand in leftOperand +} ## odrl:gt # check that the leftOperand is greater than the rightOperand diff --git a/src/main/resources/rego/vc/leftOperand.rego b/src/main/resources/rego/vc/leftOperand.rego index d16015f..0d9a838 100644 --- a/src/main/resources/rego/vc/leftOperand.rego +++ b/src/main/resources/rego/vc/leftOperand.rego @@ -7,10 +7,7 @@ import rego.v1 role(verifiable_credential,organization_id) := r if { roles := verifiable_credential.credentialSubject.roles role := [rad | some rad in roles; rad.target = organization_id ] - print(roles) - rn := role[_].names - print(rn) - r = rn; trace(organization_id) + r = role[_].names; trace(organization_id) } ## vc:currentParty