dewrich commented on a change in pull request #1950: Added CRUD for /parameters
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/1950#discussion_r171952225
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/systeminfo/system_info.go
 ##########
 @@ -87,15 +88,18 @@ WHERE p.config_file='global'`
 
        info := make(map[string]string)
        for rows.Next() {
-               p := tc.Parameter{}
+               p := tc.ParameterNullable{}
                if err = rows.StructScan(&p); err != nil {
                        return nil, fmt.Errorf("getting system_info: %v", err)
                }
-               if p.Secure && privLevel < auth.PrivLevelAdmin {
+               isSecure := *p.Secure
+               name := p.Name
+               value := p.Value
+               if isSecure && privLevel < auth.PrivLevelAdmin {
                        // Secure params only visible to admin
                        continue
                }
-               info[p.Name] = p.Value
+               info[*name] = *value
 
 Review comment:
   Noted: will make changes accordingly

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to