improve iam error handling (#6446)

* improve iam error handling

* Delete docker/test.py
This commit is contained in:
Tom Crasset
2025-01-16 17:23:19 +01:00
committed by GitHub
parent 2304d2b472
commit aa299462f2
4 changed files with 142 additions and 61 deletions

View File

@@ -80,8 +80,10 @@ func TestCanDo(t *testing.T) {
}
// object specific
assert.Equal(t, true, ident1.canDo(ACTION_WRITE, "bucket1", "/a/b/c/d.txt"))
assert.Equal(t, true, ident1.canDo(ACTION_WRITE, "bucket1", "/a/b/c/d/e.txt"))
assert.Equal(t, false, ident1.canDo(ACTION_DELETE_BUCKET, "bucket1", ""))
assert.Equal(t, false, ident1.canDo(ACTION_WRITE, "bucket1", "/a/b/other/some"), "action without *")
assert.Equal(t, false, ident1.canDo(ACTION_WRITE, "bucket1", "/a/b/*"), "action on parent directory")
// bucket specific
ident2 := &Identity{