diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-21 11:08:30 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-21 11:08:30 -0700 |
| commit | b38895734036f70879b5a342bdd7dbc222ecf55d (patch) | |
| tree | 0c0d064ae0f568c006abc91428749060279a6c04 /weed/s3api/auth_credentials_test.go | |
| parent | 31fc1657151eb7bb0f45c0657deabe664526a0eb (diff) | |
| parent | a46f873edd8a5fb0c25aeb1c5c3c33e925ed63dd (diff) | |
| download | seaweedfs-b38895734036f70879b5a342bdd7dbc222ecf55d.tar.xz seaweedfs-b38895734036f70879b5a342bdd7dbc222ecf55d.zip | |
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
Diffstat (limited to 'weed/s3api/auth_credentials_test.go')
| -rw-r--r-- | weed/s3api/auth_credentials_test.go | 9 |
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 { |
