Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel committed Feb 7, 2024
1 parent 744b769 commit 27754b1
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions apps/authz/src/opa/rego/policies/e2e.rego
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
package main

import future.keywords.in

permit[{"policyId": "test-permit-policy-1"}] = reason {
users = {"[email protected]"}
resources = {"eip155:eoa:0x90d03a8971a2faa19a9d7ffdcbca28fe826a289b"}
transferTypes = {"transferNative"}
tokens = {"eip155:137/slip44:966"}
transferValueCondition = {"currency": "*", "operator": "lte", "value": "1000000000000000000"}
approvalsRequired = [{
"approvalCount": 2,
"countPrincipal": false,
"approvalEntityType": "Narval::User",
"entityIds": ["[email protected]", "[email protected]"],
}]

permit[{"policyId": "examplePermitPolicy"}] = reason {
checkTransferResourceIntegrity
checkPrincipal
checkNonceExists
checkAction({"signTransaction"})
checkPrincipalId({"[email protected]"})
Expand All @@ -28,15 +13,8 @@ permit[{"policyId": "test-permit-policy-1"}] = reason {
reason = {"type": "permit", "policyId": "examplePermitPolicy", "approvalsSatisfied": approvals.approvalsSatisfied, "approvalsMissing": approvals.approvalsMissing}
}

forbid[{"policyId": "test-forbid-policy-1"}] = reason {
users = {"[email protected]"}
resources = {"eip155:eoa:0x90d03a8971a2faa19a9d7ffdcbca28fe826a289b"}
transferTypes = {"transferNative"}
tokens = {"eip155:137/slip44:966"}
limit = "1000000000000000000"

forbid[{"policyId": "exampleForbidPolicy"}] = reason {
checkTransferResourceIntegrity
checkPrincipal
checkNonceExists
checkAction({"signTransaction"})
checkPrincipalId({"[email protected]"})
Expand Down

0 comments on commit 27754b1

Please sign in to comment.