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 2021/12/01 23:36:30 UTC

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #6389: Update PUT user/current to work with v4 User Roles

rawlinp commented on a change in pull request #6389:
URL: https://github.com/apache/trafficcontrol/pull/6389#discussion_r760653351



##########
File path: traffic_ops/traffic_ops_golang/user/current.go
##########
@@ -309,7 +316,16 @@ func ReplaceCurrent(w http.ResponseWriter, r *http.Request) {
 		}
 	}
 
-	if err = updateUser(&user, tx, changePasswd, changeConfirmPasswd); err != nil {
+	if useV4User {
+		userV4 = user.Upgrade()
+	}
+
+	if useV4User {
+		err = updateUserV4(userV4, inf.Tx)

Review comment:
       So, as far as I can tell, the difference between userV4 and user is really just `Role`, which isn't even used/updated in the `updateUser` function. So, why doesn't just calling `updateUser(&user, tx, changePasswd, changeConfirmPasswd)` actually work?




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