Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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.