Actions
Bug #4489
closedhammer user list --search only works for login
Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
Search
Target version:
-
Description
Should I be able to search for users by any other field other than login?
# hammer user list --search 'user' -------------------------------------------------- ID | LOGIN | NAME | EMAIL -------------------------------------------------- 1 | admin | Admin User | root@usersys.redhat.com 3 | user1 | | user@example.com 4 | user11 | | user@example.com 5 | user2 | | user@example.com -------------------------------------------------- [root@qetello01 ~]# hammer user list --search 'id=3' Error: 400 Bad Request [root@qetello01 ~]# hammer user list --search id=3 Error: 400 Bad Request [root@qetello01 ~]# hammer user list --search email=user@example.com Error: 400 Bad Request [root@qetello01 ~]# hammer user list --search 'email=user@example.com' Error: 400 Bad Request [root@qetello01 ~]# hammer user list --search name=user1 Error: 400 Bad Request [root@qetello01 ~]# hammer user list --search login=user1 ------------------------------------ ID | LOGIN | NAME | EMAIL ------------------------------------ 3 | user1 | | user@example.com ------------------------------------ [root@qetello01 ~]# hammer user list --search login=user123 No data. [root@qetello01 ~]# hammer user list --search name='Admin User' Error: 400 Bad Request
Updated by Dominic Cleal about 10 years ago
- Status changed from New to Need more information
Can you provide production.log from these requests? 400 bad request is a server-side error, so it's an API bug.
Updated by Og Maciel about 10 years ago
- Status changed from Need more information to Feedback
Uploaded logs via built in rsync process: /tmp/foreman-debug-VXXbW.tar.xz
Updated by Og Maciel about 10 years ago
Newer logs found at /tmp/foreman-debug-R98fu.tar.xz
Updated by Dominic Cleal about 10 years ago
- Project changed from Hammer CLI to Foreman
- Category changed from Hammer core to Search
Ok, I see the issue. The fields available for searching users are:
- login
- firstname
- lastname
- mail (not email)
- admin
- last_login_on
- roles, usergroups
Actions