should be non-breaking now ;)

This commit is contained in:
Scott McKendry
2026-07-30 07:06:54 +12:00
parent cce0eaa974
commit c5bccd0b7b
4 changed files with 79 additions and 33 deletions
@@ -536,6 +536,16 @@ func TestAuthEnabledRule(t *testing.T) {
},
expected: EffectAllow,
},
{
name: "allows when path matches a comma-separated allow path",
ctx: &ACLContext{
ACLs: &model.App{
Path: model.AppPath{Allow: "/bar,/foo/bar,/hello"},
},
Path: "/foo/bar/baz",
},
expected: EffectAllow,
},
{
name: "allows when path matches allow regex",
ctx: &ACLContext{
@@ -546,6 +556,16 @@ func TestAuthEnabledRule(t *testing.T) {
},
expected: EffectAllow,
},
{
name: "denies when comma-separated allow paths do not match",
ctx: &ACLContext{
ACLs: &model.App{
Path: model.AppPath{Allow: "/bar,/foo/bar,/hello"},
},
Path: "/private",
},
expected: EffectDeny,
},
{
name: "denies when path does not match allow path",
ctx: &ACLContext{