This Bug Report affects these Traffic Control components:
Current behavior:
A PUT request /user/current is incapable of modifying anything about the current user - except that it does update lastUpdated.
Expected behavior:
You should be able to update your user using a PUT request to /user/current, as this was possible in previous Traffic Ops versions.
Steps to reproduce:
- GET
/user/current e.g.
{
"response": {
"username": "quest",
"localUser": true,
"roleName": "admin",
"addressLine1": null,
"addressLine2": null,
"city": null,
"company": null,
"country": null,
"email": "email@addr.com",
"fullName": "test",
"gid": null,
"id": 13,
"newUser": false,
"phoneNumber": null,
"postalCode": null,
"publicSshKey": null,
"role": 1,
"stateOrProvince": null,
"tenant": "root",
"tenantId": 1,
"uid": null,
"lastUpdated": "2021-11-21 20:22:31+00"
}
}
- Change anything, or even everything if you want, and submit it in a PUT request to
/user/current e.g.
{
"username": "queste",
"registrationSent": "2021-11-21 20:11:24+00",
"roleName": "admin",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"city": "city",
"company": "company",
"country": "country",
"email": "address@mail.com",
"fullName": "testquest",
"gid": 7,
"id": 18,
"newUser": true,
"phoneNumber": "phoneNumber",
"postalCode": "postalCode",
"publicSshKey": "SSH",
"role": 2,
"stateOrProvince": "state",
"tenant": "roote",
"tenantId": 2,
"uid": 8,
"lastUpdated": "2021-11-21 20:11:25+00",
"token": "token",
"localUser": false
}
- Notice the response changed nothing e.g.
{
"alerts": [
{
"text": "User profile was successfully updated",
"level": "success"
}
],
"response": {
"username": "quest",
"registrationSent": null,
"roleName": "admin",
"addressLine1": null,
"addressLine2": null,
"city": null,
"company": null,
"country": null,
"email": "email@addr.com",
"fullName": "test",
"gid": null,
"id": 13,
"newUser": false,
"phoneNumber": null,
"postalCode": null,
"publicSshKey": null,
"role": 1,
"stateOrProvince": null,
"tenant": "root",
"tenantId": 1,
"uid": null,
"lastUpdated": "2021-11-21 20:15:20+00"
}
}
Note that subsequent GET requests to /user/current or /users will confirm that nothing changed
This Bug Report affects these Traffic Control components:
Current behavior:
A PUT request
/user/currentis incapable of modifying anything about the current user - except that it does updatelastUpdated.Expected behavior:
You should be able to update your user using a PUT request to
/user/current, as this was possible in previous Traffic Ops versions.Steps to reproduce:
/user/currente.g.{ "response": { "username": "quest", "localUser": true, "roleName": "admin", "addressLine1": null, "addressLine2": null, "city": null, "company": null, "country": null, "email": "email@addr.com", "fullName": "test", "gid": null, "id": 13, "newUser": false, "phoneNumber": null, "postalCode": null, "publicSshKey": null, "role": 1, "stateOrProvince": null, "tenant": "root", "tenantId": 1, "uid": null, "lastUpdated": "2021-11-21 20:22:31+00" } }/user/currente.g.{ "username": "queste", "registrationSent": "2021-11-21 20:11:24+00", "roleName": "admin", "addressLine1": "addressLine1", "addressLine2": "addressLine2", "city": "city", "company": "company", "country": "country", "email": "address@mail.com", "fullName": "testquest", "gid": 7, "id": 18, "newUser": true, "phoneNumber": "phoneNumber", "postalCode": "postalCode", "publicSshKey": "SSH", "role": 2, "stateOrProvince": "state", "tenant": "roote", "tenantId": 2, "uid": 8, "lastUpdated": "2021-11-21 20:11:25+00", "token": "token", "localUser": false }{ "alerts": [ { "text": "User profile was successfully updated", "level": "success" } ], "response": { "username": "quest", "registrationSent": null, "roleName": "admin", "addressLine1": null, "addressLine2": null, "city": null, "company": null, "country": null, "email": "email@addr.com", "fullName": "test", "gid": null, "id": 13, "newUser": false, "phoneNumber": null, "postalCode": null, "publicSshKey": null, "role": 1, "stateOrProvince": null, "tenant": "root", "tenantId": 1, "uid": null, "lastUpdated": "2021-11-21 20:15:20+00" } }Note that subsequent GET requests to /user/current or /users will confirm that nothing changed