Pass groups claim into condition values (#15679)

This allows using `jwt:groups` as a multi-valued condition key in policies.
This commit is contained in:
Aditya Manthramurthy
2022-09-13 09:45:36 -07:00
committed by GitHub
parent a71629d4dd
commit e152b2a975
3 changed files with 226 additions and 0 deletions

View File

@@ -1205,6 +1205,13 @@ func (c *check) mustListObjects(ctx context.Context, client *minio.Client, bucke
}
}
func (c *check) mustListBuckets(ctx context.Context, client *minio.Client) {
_, err := client.ListBuckets(ctx)
if err != nil {
c.Fatalf("user was unable to list buckets: %v", err)
}
}
func (c *check) mustNotUpload(ctx context.Context, client *minio.Client, bucket string) {
_, err := client.PutObject(ctx, bucket, "some-object", bytes.NewBuffer([]byte("stuff")), 5, minio.PutObjectOptions{})
if e, ok := err.(minio.ErrorResponse); ok {