Bug 469957 - user.setDetails (and getDetails) uses 'first_names' as key.
user.setDetails (and getDetails) uses 'first_names' as key.
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Dobies
wes hayutin
Depends On:
Blocks: 456996
  Show dependency treegraph
Reported: 2008-11-04 16:44 EST by Justin Sherrill
Modified: 2009-09-10 15:53 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 15:53:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2008-11-04 16:44:22 EST
why first_names ?  it doesn't make sense.  You can only have one.  It uses 'last_name' not 'last_names', so why use 'first_names'?????

Comment 1 Jay Dobies 2009-02-13 14:38:10 EST
Commit: 233c64b8e502fe85ed1a77730559078d32adcdb8
Tag: spacewalk-java-0.5.14-1

UserHandler.java, UserHandlerTest.java
- Added map to translate the user submitted key into an internal key. The only real translation that happens in this is from first_name to first_names, to allow the user specified key to read correctly and then translate to our incorrect domain model usage.

The pluralization of first name goes deep into our code; it's even that way on User. I didn't want to do such a major refactor now, but at the same time I wanted to get the API correct and prevent having to have an incompatible API later. This way, if we do refactor the internal naming in the future, the external facing APIs won't have to change.

SVN Commit: r181460
- Updated test for API key name change
Comment 2 Jay Dobies 2009-02-13 14:49:09 EST
Commit: 5712dd41a819b488081aafdcb605b55d1a3b6e5e
Tag: spacewalk-0.5.14-1

UserHandler.java, UserHandlerTest.java
- Changed getDetails to use first_name instead of plural (see above comment for explanation).

SVN Commit: r181463
- Updated test for API key name change
Comment 3 wes hayutin 2009-03-09 15:20:11 EDT
apiusere2KIkFS3IHRK5    	 bob, bill   	(normal user)
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '310x08259a0cc38284946a1886d149a39479'
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '311x1788823f15531f4d67880c108665b4ae'
Processing method: user.create
Comment 4 Tomas Lestach 2009-08-13 08:29:43 EDT
Having both keys: first_name and first_names in user.setDetails and user.getDetails.

If setting both for user.setDetails., first_name has higher prio. :)

Stage validated -> RELEASE_PENDING
Comment 5 Brandon Perkins 2009-09-10 15:53:53 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.