From 646127abe7237c782065a55ba4cbddf2f937f5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Mon, 16 Sep 2024 11:07:57 +0200 Subject: [PATCH] policy formatting --- delegate_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/delegate_test.go b/delegate_test.go index 03bb37a..9ce8c21 100644 --- a/delegate_test.go +++ b/delegate_test.go @@ -12,6 +12,7 @@ import ( "github.com/libp2p/go-libp2p/core/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ucan-wg/go-ucan" "github.com/ucan-wg/go-ucan/capability/command" "github.com/ucan-wg/go-ucan/capability/policy" @@ -30,16 +31,16 @@ const ( subJectCmd = "/foo/bar" subjectPol = ` [ - ["==", ".status", "draft"], - ["all", ".reviewer", [ - ["like", ".email", "*@example.com"]] - ], - ["any", ".tags", [ + ["==", ".status", "draft"], + ["all", ".reviewer", [ + ["like", ".email", "*@example.com"] + ]], + ["any", ".tags", [ ["or", [ ["==", ".", "news"], - ["==", ".", "press"]] - ]] - ] + ["==", ".", "press"] + ]] + ]] ] ` )