Project

General

Profile

Actions

Bug #4489

closed

hammer user list --search only works for login

Added by Og Maciel about 10 years ago. Updated about 10 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
Search
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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
Actions #1

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.

Actions #2

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

Actions #3

Updated by Og Maciel about 10 years ago

Newer logs found at /tmp/foreman-debug-R98fu.tar.xz

Actions #4

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

Also available in: Atom PDF