From 7eceda78b9f0cc03946b5922697ad13d0cba55db Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 24 May 2025 18:21:25 -0600 Subject: chore: remove default cedar examples --- app/app_test.go | 10 ---------- pkg/policies/album.cedar | 5 ----- pkg/policies/entities.json | 23 ----------------------- 3 files changed, 38 deletions(-) delete mode 100644 pkg/policies/album.cedar diff --git a/app/app_test.go b/app/app_test.go index fcdee36c..f0068e87 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -28,16 +28,6 @@ func TestApp(t *testing.T) { assert.False(t, reply.Result) }) - t.Run("allows alice:view:jane_vacation", func(t *testing.T) { - reply, err := client.Allowed(t.Context(), &rpc.AllowRequest{ - Subject: "gid://example/User/alice", - Permission: "view", - Resource: "gid://example/Album/jane_vacation", - }) - require.NoError(t, err) - assert.True(t, reply.Result) - }) - t.Run("allows gid://User/1 read gid://Organization/2", func(t *testing.T) { reply, err := client.Allowed(t.Context(), &rpc.AllowRequest{ Subject: "gid://example/User/1", diff --git a/pkg/policies/album.cedar b/pkg/policies/album.cedar deleted file mode 100644 index aed5a53e..00000000 --- a/pkg/policies/album.cedar +++ /dev/null @@ -1,5 +0,0 @@ -permit ( - principal == User::"alice", - action == Permission::"view", - resource in Album::"jane_vacation" -); diff --git a/pkg/policies/entities.json b/pkg/policies/entities.json index 75d08750..8d50e674 100644 --- a/pkg/policies/entities.json +++ b/pkg/policies/entities.json @@ -1,27 +1,4 @@ [ - { - "uid": { - "type": "User", - "id": "alice" - }, - "attrs": { - "age": 18 - }, - "parents": [] - }, - { - "uid": { - "type": "Photo", - "id": "VacationPhoto94.jpg" - }, - "attrs": {}, - "parents": [ - { - "type": "Album", - "id": "jane_vacation" - } - ] - }, { "uid": { "type": "User", -- cgit v1.2.3