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

PUT /user/current doesn't work #6367

Closed
ocket8888 opened this issue Nov 21, 2021 · 2 comments · Fixed by #6389
Closed

PUT /user/current doesn't work #6367

ocket8888 opened this issue Nov 21, 2021 · 2 comments · Fixed by #6389
Labels
high impact impacts the basic function, deployment, or operation of a CDN regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Milestone

Comments

@ocket8888
Copy link
Contributor

ocket8888 commented Nov 21, 2021

This Bug Report affects these Traffic Control components:

  • Traffic Ops

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:

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

@ocket8888 ocket8888 added regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops labels Nov 21, 2021
@ocket8888 ocket8888 added the high impact impacts the basic function, deployment, or operation of a CDN label Nov 30, 2021
@mitchell852
Copy link
Member

@ocket8888 - are all versions broken? 3.1? 4.0?

@zrhoffman zrhoffman added this to the 6.0.2 milestone Dec 1, 2021
@ocket8888
Copy link
Contributor Author

Yes. All versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high impact impacts the basic function, deployment, or operation of a CDN 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.

3 participants