ocket8888 commented on code in PR #7819:
URL: https://github.com/apache/trafficcontrol/pull/7819#discussion_r1339346602


##########
traffic_ops/traffic_ops_golang/cdn_lock/cdn_lock.go:
##########
@@ -234,14 +234,20 @@ func Delete(w http.ResponseWriter, r *http.Request) {
        var err error
        adminPerms := inf.Config.RoleBasedPermissions && 
inf.User.Can("CDN-LOCK:DELETE-OTHERS")

Review Comment:
   Only APIv4 should check the configuration setting.



##########
traffic_ops/traffic_ops_golang/profile/profiles.go:
##########
@@ -189,10 +189,20 @@ func (prof *TOProfile) Read(h http.Header, useIMS bool) 
([]interface{}, error, e
        }
        rows.Close()
        profileInterfaces := []interface{}{}
+       canReadSecureValue := false
+       if prof.APIInfo() != nil && prof.APIInfo().Version != nil {
+               if 
(prof.APIInfo().Version.GreaterThanOrEqualTo(&api.Version{Major: 4}) && 
prof.APIInfo().Config.RoleBasedPermissions) || 
prof.APIInfo().Version.GreaterThanOrEqualTo(&api.Version{Major: 5}) {

Review Comment:
   same as above



##########
traffic_ops/traffic_ops_golang/profile/profiles.go:
##########
@@ -429,10 +438,17 @@ func Read(w http.ResponseWriter, r *http.Request) {
        }
        rows.Close()
        profileInterfaces := []interface{}{}
+
+       canReadSecureValue := false
+       if inf.Config.RoleBasedPermissions &&

Review Comment:
   same as above



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