Add organizations and locations to user api json data
Created from redmine issue http://projects.theforeman.org/issues/9856
Upstream bug assigned to tomckay
Moving to POST since upstream bug http://projects.theforeman.org/issues/9856 has been closed ------------- Thomas McKay Applied in changeset commit:4d7294767840da554b382b6c37d080870537509b.
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)
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.
This bug is slated to be released with Satellite 6.1.
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.