Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

PUT /user/current doesn't work #6367

@ocket8888

Description

@ocket8888

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 protected]",
		"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": "[email protected]",
        "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 protected]",
		"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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic Opshigh impactimpacts the basic function, deployment, or operation of a CDNregression buga bug in existing functionality introduced by a new version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions