TO-golang users API "rolename" regression #3219
Labels
regression bug
a bug in existing functionality introduced by a new version
Traffic Ops
related to Traffic Ops
I fixed a bug a while back that was caused by wrong capitalization of the
"roleName"
field in the/api/1.x/user/current
API endpoint: #2535. This bug has come back due to #2846 which set the field back to"rolename"
.This is a client-breaking change because clients expect the field in
GET /api/x/user/current
to be"roleName"
not"rolename"
. There are other user endpoints that return"rolename"
, but this is not consistent across all user endpoints. If you take a close look at https://github.com/apache/trafficcontrol/blob/master/traffic_ops/app/lib/API/User.pm you will see that the different endpoints will return either"roleName"
or"rolename"
depending on the endpoint. It appears the API documentation has also been updated to not match the Perl implementation.The field names in the Golang implementation of the users endpoints should match the Perl versions exactly, otherwise clients will be broken. For example, in Traffic Portal you no longer have the option to bypass the Delivery Service Request workflow based upon your role name (e.g. "admin"), since Traffic Portal is expecting
"roleName"
rather than"rolename"
.The text was updated successfully, but these errors were encountered: