Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Jul 4, 2024
1 parent b393531 commit b51fa62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/main/resources/rego/odrl/operator.rego
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/main/resources/rego/vc/leftOperand.rego
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b51fa62

Please sign in to comment.