fix: v1 auth create supports multiple buckets (#328)

This commit is contained in:
yumenomatayume 2021-11-12 01:43:14 +09:00 committed by GitHub
parent adc58b8441
commit 6a7c4f6d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,7 @@ func (c Client) Create(ctx context.Context, params *CreateParams) error {
var permissions []api.Permission
for _, bp := range bucketPerms {
for _, p := range bp.perms {
p := p
// verify the input ID
if err := influxid.Validate(p); err != nil {
return fmt.Errorf("invalid bucket ID '%s': %w (did you pass a bucket name instead of an ID?)", p, err)