Fix Set Policy on Groups with spaces (#3453)

This commit is contained in:
Cesar N.
2024-10-28 12:28:07 -07:00
committed by GitHub
parent 8c1ecae68a
commit dc19984f23
5 changed files with 2 additions and 17 deletions

View File

@@ -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",

View File

@@ -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
}

View File

@@ -3706,7 +3706,6 @@ definitions:
iamEntity:
type: string
pattern: '^[\w+=,.@-]{1,64}$'
addPolicyRequest:
type: object

View File

@@ -208,7 +208,6 @@ export interface SetPolicyMultipleNameRequest {
groups?: IamEntity[];
}
/** @pattern ^[\w+=,.@-]{1,64}$ */
export type IamEntity = string;
export interface AddPolicyRequest {