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

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