From 100c673c3a95827698758139f887a3e744231c42 Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Wed, 21 Aug 2024 22:30:42 -0700 Subject: feat: add anon access mgmt --- internal/authz/middleware_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/authz/middleware_test.go') diff --git a/internal/authz/middleware_test.go b/internal/authz/middleware_test.go index 3dfa997..2d499ce 100644 --- a/internal/authz/middleware_test.go +++ b/internal/authz/middleware_test.go @@ -112,6 +112,13 @@ func TestAuthorization(t *testing.T) { description: "an unauthorized action should yield a 403", body: []byte("Access denied\n"), }, + { + url: fmt.Sprintf("%s/%s", baseURL, "repo/url/bar"), + user: "anon", + expectedStatus: http.StatusUnauthorized, + description: "an unauthorized action should yield a 403", + body: []byte("Authentication Required\n"), + }, } svcr, _ := admin.NewService( "../../auth_model.ini", -- cgit v1.2.3