From b51fa6210a53db747bfcae6a6444eb78a1b73b7a Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 4 Jul 2024 13:21:19 +0200 Subject: [PATCH] log --- src/main/resources/rego/odrl/operator.rego | 12 ++++++------ src/main/resources/rego/vc/leftOperand.rego | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-) 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