rimashah25 commented on code in PR #7806:
URL: https://github.com/apache/trafficcontrol/pull/7806#discussion_r1328844133
##########
traffic_ops/traffic_ops_golang/routing/routes.go:
##########
@@ -395,10 +395,11 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
{Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodDelete, Path: `deliveryservices/{xmlID}/urisignkeys$`, Handler:
urisigning.RemoveDeliveryServiceURIKeysHandler, RequiredPrivLevel:
auth.PrivLevelAdmin, RequiredPermissions: []string{"DS-SECURITY-KEY:DELETE",
"DS-SECURITY-KEY:READ", "DELIVERY-SERVICE:READ", "DELIVERY-SERVICE:UPDATE"},
Authenticated: Authenticated, Middlewares: nil, ID: 42992541731},
// Federations by CDN (the actual table for federation)
- {Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodGet, Path: `cdns/{name}/federations/?$`, Handler:
api.ReadHandler(&cdnfederation.TOCDNFederation{}), RequiredPrivLevel:
auth.PrivLevelReadOnly, RequiredPermissions: []string{"CDN:READ",
"FEDERATION:READ", "DELIVERY-SERVICE:READ"}, Authenticated: Authenticated,
Middlewares: nil, ID: 48922503231},
- {Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodPost, Path: `cdns/{name}/federations/?$`, Handler:
api.CreateHandler(&cdnfederation.TOCDNFederation{}), RequiredPrivLevel:
auth.PrivLevelAdmin, RequiredPermissions: []string{"FEDERATION:CREATE",
"FEDERATION:READ, CDN:READ"}, Authenticated: Authenticated, Middlewares: nil,
ID: 495489421931},
- {Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodPut, Path: `cdns/{name}/federations/{id}$`, Handler:
api.UpdateHandler(&cdnfederation.TOCDNFederation{}), RequiredPrivLevel:
auth.PrivLevelAdmin, RequiredPermissions: []string{"FEDERATION:UPDATE",
"FEDERATION:READ", "CDN:READ"}, Authenticated: Authenticated, Middlewares: nil,
ID: 42606546631},
- {Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodDelete, Path: `cdns/{name}/federations/{id}$`, Handler:
api.DeleteHandler(&cdnfederation.TOCDNFederation{}), RequiredPrivLevel:
auth.PrivLevelAdmin, RequiredPermissions: []string{"FEDERATION:DELETE",
"FEDERATION:READ", "CDN:READ"}, Authenticated: Authenticated, Middlewares: nil,
ID: 444285290231},
+ {Version: api.Version{Major: 5, Minor: 0}, Method:
http.MethodGet, Path: `cdns/{name}/federations/?$`, Handler:
api.Wrap(cdnfederation.Read, []string{"name"}, nil), RequiredPrivLevel:
auth.PrivLevelReadOnly, RequiredPermissions: []string{"CDN:READ",
"FEDERATION:READ", "DELIVERY-SERVICE:READ"}, Authenticated: Authenticated,
Middlewares: nil, ID: 48922503231},
Review Comment:
So, why not do it for all the routes in a different PR, then have it just
done for one. I didn't review server's PR, else I would have commented the same
on that one too.
--
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]