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