func (u *TeleportUser) Check() error {
	if !cstrings.IsValidUnixUser(u.Name) {
		return trace.BadParameter("'%v' is not a valid user name", u.Name)
	}
	if len(u.AllowedLogins) == 0 {
		return trace.BadParameter("'%v' has no valid allowed logins", u.Name)
	}
	for _, login := range u.AllowedLogins {
		if !cstrings.IsValidUnixUser(login) {
			return trace.BadParameter("'%v' is not a valid user name", login)
		}
	}
	for _, id := range u.OIDCIdentities {
		if err := id.Check(); err != nil {
			return trace.Wrap(err)
		}
	}
	return nil
}
// Check checks validity of all parameters
Check checks validity of all parameters
// Check checks validity of all parameters
func (u *TeleportUser) Check() error {
	if !cstrings.IsValidUnixUser(u.Name) {
		return trace.BadParameter("'%v' is not a valid user name", u.Name)
	}
	if len(u.AllowedLogins) == 0 {
		return trace.BadParameter("'%v' has no valid allowed logins", u.Name)
	}
	for _, login := range u.AllowedLogins {
		if !cstrings.IsValidUnixUser(login) {
			return trace.BadParameter("'%v' is not a valid user name", login)
		}
	}
	for _, id := range u.OIDCIdentities {
		if err := id.Check(); err != nil {
			return trace.Wrap(err)
		}
	}
	return nil
}
func ( u * TeleportUser ) Check ( ) error { if ! cstrings . IsValidUnixUser ( u . Name ) { return trace . BadParameter ( " " , u . Name ) } if len ( u . AllowedLogins ) == 0 { return trace . BadParameter ( " " , u . Name ) } for _ , login := range u . AllowedLogins { if ! cstrings . IsValidUnixUser ( login ) { return trace . BadParameter ( " " , login ) } } for _ , id := range u . OIDCIdentities { if err := id . Check ( ) ; err != nil { return trace . Wrap ( err ) } } return nil }
Check checks validity of all parameters
Check checks validity of all parameters