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 1400713 - API search users per usergroup
Summary: API search users per usergroup
Keywords:
Status: CLOSED DUPLICATE of bug 1395667
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.2.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-01 22:23 UTC by Christian Marineau
Modified: 2020-01-17 16:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-12 13:50:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Christian Marineau 2016-12-01 22:23:22 UTC
Description of problem:
Error received when trying to search users from specific usergroup from API
Example:
https://satellite.fqdn/api/v2/users?search=usergroup="Group Name"

Version-Release number of selected component (if applicable):
6.2.X

Steps to Reproduce:
1. Create a usergroup
2. Add user to the usergroup
3. Call the API https://satellite.fqdn/api/v2/users?search=usergroup="Group Name"

Actual results:
{
  "error": {"message":"PG::Error: ERROR:  column \"member_type\" does not exist\nLINE 3: ....\"id\" = \"cached_usergroup_members\".\"user_id\"  AND member_typ...\n                                                             ^\n: SELECT  DISTINCT \"users\".\"id\", firstname AS alias_0, firstname AS alias_1 FROM \"users\" LEFT OUTER JOIN \"cached_usergroup_members\" ON \"cached_usergroup_members\".\"user_id\" = \"users\".\"id\" LEFT OUTER JOIN \"usergroups\" ON \"usergroups\".\"id\" = \"cached_usergroup_members\".\"usergroup_id\" WHERE (\"users\".\"auth_source_id\" NOT IN (2)) AND ((\"users\".\"id\" IN (SELECT \"users\".\"id\" FROM         \"users\"\n        INNER JOIN \"cached_usergroup_members\"\n        ON \"users\".\"id\" = \"cached_usergroup_members\".\"user_id\"  AND member_type = 'User'\n        INNER JOIN \"usergroups\"\n        ON \"cached_usergroup_members\".\"usergroup_id\" = \"usergroups\".\"id\" \n WHERE \"usergroups\".\"name\" = 'Group Name' )))  ORDER BY firstname LIMIT 20 OFFSET 0"}
}


Expected results:
No error

Comment 3 Christian Marineau 2016-12-12 13:50:04 UTC

*** This bug has been marked as a duplicate of bug 1395667 ***


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