Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TO-golang users API "rolename" regression #3219

Closed
rawlinp opened this issue Jan 15, 2019 · 1 comment · Fixed by #3218
Closed

TO-golang users API "rolename" regression #3219

rawlinp opened this issue Jan 15, 2019 · 1 comment · Fixed by #3218
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops

Comments

@rawlinp
Copy link
Contributor

rawlinp commented Jan 15, 2019

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

@rawlinp rawlinp added Traffic Ops related to Traffic Ops regression bug a bug in existing functionality introduced by a new version labels Jan 15, 2019
@mitchell852 mitchell852 added the bug something isn't working as intended label Jan 15, 2019
@mitchell852
Copy link
Member

@moltzaum is looking at this

@mitchell852 mitchell852 removed the bug something isn't working as intended label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants