Can't update user data with /users/{id} PUT API

RESOLVED INVALID

Status

Mozilla QA
Case Conductor-Platform
RESOLVED INVALID
7 years ago
7 years ago

People

(Reporter: camd, Unassigned)

Tracking

Details

(Reporter)

Description

7 years ago
I'm attempting to put to data for a user, and I get a 200 response, but the data is not updated in the database.  Changed email, screenname

Server log:
--------------------------------------
13:11:34,371 INFO  [LoggingInInterceptor] Inbound Message
----------------------------
ID: 2653
Address: /tcm/services/v2/rest/users/2
Encoding: ISO-8859-1
Content-Type: application/x-www-form-urlencoded
Headers: {content-type=[application/x-www-form-urlencoded], Authorization=[Basic YWRtaW5AdXRlc3QuY29tOmFkbWlu], host=[localhost:8080], Content-Length=[127], accept-encoding=[identity], Content-Type=[application/x-www-form-urlencoded]}
Payload: firstName=Walter&companyId=21&companyId=0&lastName=Bishop&originalVersionId=0&email=doctor%40horrible.com&screenName=drHorrible
--------------------------------------
13:11:34,389 INFO  [LoggingInInterceptor] Outbound Message
---------------------------
ID: 2653
Response-Code: 200
Content-Type: application/json
Headers: {Date=[Fri, 04 Mar 2011 21:11:34 GMT]}
Payload: {"ns1.user":[{"@xsi.type":"ns1:user","ns1.resourceIdentity":{"@id":"2","@url":"http:\/\/localhost:8080\/tcm\/services\/v2\/rest\/users\/2","@version":"0","@xsi.type":"ns1:ResourceIdentity"},"ns1.timeline":{"@createDate":"2011-03-04T13:11:34-08:00","@createdBy":"1","@lastChangeDate":"2011-03-04T13:11:34-08:00","@lastChangedBy":"1","@xsi.type":"ns1:Timeline"},"ns1.companyId":21,"ns1.companyLocator":{"@id":"21","@url":"http:\/\/localhost:8080\/tcm\/services\/v2\/rest\/companies\/21","@xsi.type":"ns1:ResourceLocator"},"ns1.email":"WalterBishop@mozilla.com","ns1.firstName":"Walter","ns1.lastName":"Bishop","ns1.password":{"@xsi.nil":"true"},"ns1.screenName":"WalterBishop","ns1.userStatusId":2}]}
--------------------------------------
(Reporter)

Comment 1

7 years ago
Failing Automated Test Scenario:

Scenario: Update User information (Bug 638935)              
  Given I create the seed company and product with these names:
    | company name    | product name |
    | Massive Dynamic | Cortexiphan  |
  And I create a new user with name "Walter Bishop"            
  And I create a new company with name "Ace Max Detectives"    
  When I update the user with that name to have these values:  
    | firstName | lastName | email               | screenName | company name       |
    | Walter    | Bishop   | doctor@horrible.com | drHorrible | Ace Max Detectives |
  Then the user with that name has these values:               
    | firstName | lastName | email               | screenName | company name       |
    | Walter    | Bishop   | doctor@horrible.com | drHorrible | Ace Max Detectives |
  Traceback (most recent call last):

  AssertionError: 
  	Exp:u'doctor@horrible.com'
  	Act:u'WalterBishop@mozilla.com'
  u'Field "email" mismatch'

Comment 2

7 years ago
You cannot update users email and screen name with this call...
The only valid arguments are:

companyId_
firstName_
lastName_
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.