ericholguin commented on code in PR #7688:
URL: https://github.com/apache/trafficcontrol/pull/7688#discussion_r1282384759


##########
traffic_ops/traffic_ops_golang/parameter/parameters.go:
##########
@@ -176,10 +176,14 @@ func (param *TOParameter) Read(h http.Header, useIMS 
bool) ([]interface{}, error
                        return nil, nil, errors.New("scanning " + 
param.GetType() + ": " + err.Error()), http.StatusInternalServerError, nil
                }
                if p.Secure != nil && *p.Secure {
-                       if param.ReqInfo.Version.Major >= 4 &&
-                               param.ReqInfo.Config.RoleBasedPermissions &&
-                               
!param.ReqInfo.User.Can("PARAMETER-SECURE:READ") {
-                               p.Value = &HiddenField
+                       if param.ReqInfo.Version.Major >= 4 {
+                               if param.ReqInfo.Config.RoleBasedPermissions {
+                                       if 
!param.ReqInfo.User.Can("PARAMETER-SECURE:READ") {
+                                               p.Value = &HiddenField
+                                       }
+                               } else if param.ReqInfo.User.PrivLevel < 
auth.PrivLevelAdmin {
+                                       p.Value = &HiddenField
+                               }

Review Comment:
   By fix do you mean adding a conditional for version >= 5 to not check the 
config and only use permissions?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to