Fix Set Policy on Groups with spaces (#3453)
This commit is contained in:
@@ -5965,8 +5965,7 @@ func init() {
|
||||
}
|
||||
},
|
||||
"iamEntity": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w+=,.@-]{1,64}$"
|
||||
"type": "string"
|
||||
},
|
||||
"iamPolicy": {
|
||||
"type": "object",
|
||||
@@ -14895,8 +14894,7 @@ func init() {
|
||||
}
|
||||
},
|
||||
"iamEntity": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w+=,.@-]{1,64}$"
|
||||
"type": "string"
|
||||
},
|
||||
"iamPolicy": {
|
||||
"type": "object",
|
||||
|
||||
@@ -25,9 +25,7 @@ package models
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// IamEntity iam entity
|
||||
@@ -37,15 +35,6 @@ type IamEntity string
|
||||
|
||||
// Validate validates this iam entity
|
||||
func (m IamEntity) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := validate.Pattern("", "body", string(m), `^[\w+=,.@-]{1,64}$`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3706,7 +3706,6 @@ definitions:
|
||||
|
||||
iamEntity:
|
||||
type: string
|
||||
pattern: '^[\w+=,.@-]{1,64}$'
|
||||
|
||||
addPolicyRequest:
|
||||
type: object
|
||||
|
||||
@@ -208,7 +208,6 @@ export interface SetPolicyMultipleNameRequest {
|
||||
groups?: IamEntity[];
|
||||
}
|
||||
|
||||
/** @pattern ^[\w+=,.@-]{1,64}$ */
|
||||
export type IamEntity = string;
|
||||
|
||||
export interface AddPolicyRequest {
|
||||
|
||||
Reference in New Issue
Block a user