You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/07/27 09:09:56 UTC

[GitHub] [trafficcontrol] hritvikpatel4 commented on a diff in pull request #6895: Fix user update to raise exception when the username contains spaces

hritvikpatel4 commented on code in PR #6895:
URL: https://github.com/apache/trafficcontrol/pull/6895#discussion_r930816759


##########
lib/go-tc/users.go:
##########
@@ -487,6 +488,8 @@ func (u *CurrentUserUpdateRequestUser) UnmarshalAndValidate(user *User) error {
 			errs = append(errs, fmt.Errorf("username: %w", err))
 		} else if user.Username == nil || *user.Username == "" {
 			errs = append(errs, errors.New("username: cannot be null or empty string"))
+		} else if strings.Contains(*user.Username, " ") {
+			errs = append(errs, errors.New("username: cannot contain spaces"))

Review Comment:
   > The controller for the user details page view can be found at `traffic_portal/app/src/common/modules/form/user/FormUserController.js`
   
   Alright, I'll look into that file. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org