Bug 1204384

Summary: user api json does not include organizations and locations
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: ProvisioningAssignee: Tom McKay <tomckay>
Status: CLOSED CURRENTRELEASE QA Contact: Elyézer Rezende <erezende>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, bkearney, cwelton, erezende
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9856
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 13:58:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2015-03-21 14:17:33 UTC
Add organizations and locations to user api json data

Comment 1 Tom McKay 2015-03-21 14:17:34 UTC
Created from redmine issue http://projects.theforeman.org/issues/9856

Comment 3 Bryan Kearney 2015-03-21 16:05:11 UTC
Upstream bug assigned to tomckay

Comment 4 Bryan Kearney 2015-03-22 18:05:27 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9856 has been closed
-------------
Thomas McKay
Applied in changeset commit:4d7294767840da554b382b6c37d080870537509b.

Comment 5 Bryan Kearney 2015-04-16 13:24:38 UTC
commit 2dc7615d007ab682fbca27b309ad6b2d01c6f289
Author: Tom McKay <thomasmckay>
Date:   Sat Mar 21 10:31:09 2015 -0400

    fixes #9856 - include locations and organizations in user output
    
    (cherry picked from commit 4d7294767840da554b382b6c37d080870537509b)

Comment 6 Elyézer Rezende 2015-05-04 19:35:59 UTC
Verified on: Satellite-6.1.0-RHEL-7-20150429.2

Steps to verify:

1) Created a user and added Default Organization and Location to it
2) Done a API call:

2015-05-04 16:30:43 - nailgun.client - DEBUG - Making HTTP GET request to https://satserver.com:443/api/v2/users/5 with options {'verify': False, 'auth': ('admin', 'password'), 'headers': {'content-type': 'application/json'}} and no data.

2015-05-04 16:30:44 - nailgun.client - DEBUG - Received HTTP 200 response: {"id":5,"login":"a2","firstname":"","lastname":"","mail":"a2","admin":false,"auth_source_id":1,"auth_source_name":"Internal","last_login_on":null,"created_at":"2015-04-30T16:44:37Z","updated_at":"2015-05-04T19:30:40Z","default_location":{"id":2,"name":"Default Location","title":"Default Location"},"locations":[{"id":2,"name":"Default Location","title":"Default Location"}],"default_organization":{"id":1,"name":"Default Organization","title":"Default Organization"},"organizations":[{"id":1,"name":"Default Organization","title":"Default Organization"}],"auth_source_internal":{"id":1,"type":"AuthSourceInternal","name":"Internal"},"mail_notifications":[],"roles":[{"name":"Anonymous","id":14}],"usergroups":[]}

3) Was returned information about default location, default organization, organizations and locations.

Comment 7 Bryan Kearney 2015-08-11 13:32:54 UTC
This bug is slated to be released with Satellite 6.1.

Comment 8 Bryan Kearney 2015-08-12 13:58:22 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.