aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/auth_credentials_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/auth_credentials_test.go')
-rw-r--r--weed/s3api/auth_credentials_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/s3api/auth_credentials_test.go b/weed/s3api/auth_credentials_test.go
index 1f0ffc1cc..645932aba 100644
--- a/weed/s3api/auth_credentials_test.go
+++ b/weed/s3api/auth_credentials_test.go
@@ -126,6 +126,15 @@ func TestCanDo(t *testing.T) {
}
assert.Equal(t, true, ident5.canDo(ACTION_READ, "special_bucket", "/a/b/c/d.txt"))
assert.Equal(t, true, ident5.canDo(ACTION_WRITE, "special_bucket", "/a/b/c/d.txt"))
+
+ // anonymous buckets
+ ident6 := &Identity{
+ Name: "anonymous",
+ Actions: []Action{
+ "Read",
+ },
+ }
+ assert.Equal(t, true, ident6.canDo(ACTION_READ, "anything_bucket", "/a/b/c/d.txt"))
}
type LoadS3ApiConfigurationTestCase struct {