Bug #6003

user management through hammer not working

Added by Ignacio Bravo over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Thomas McKay
Category:API
Target version:Sprint 25
Difficulty: Bugzilla link:1110337
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.5.2Release relationshipAuto

Description

Created a new user to manage Katello/Foreman.

The following command produces and error:

  1. hammer -u admin -p changeme user list
    undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000e782a68>

When performing a user info, I can get the first two (admin and a hidden user that I don't know how it was created). The rest of the users info fail with an error:

  1. hammer -u admin -p changeme user info --id 1
    Id: 1
    Login: admin
    Name: Admin User
    Email:
    Admin: yes
    Authorized by: Internal
    Last login: 2014/05/30 20:09:43
    Created at: 2014/05/29 16:49:01
    Updated at: 2014/05/30 20:09:43
  1. hammer -u admin -p changeme user info --id 2
    Id: 2
    Login: hidden-0zd9qe
    Name:
    Email: sm79ogUAtw@localhost
    Admin: no
    Authorized by: Internal
    Last login:
    Created at: 2014/05/29 16:49:04
    Updated at: 2014/05/29 16:49:04
  1. hammer -u admin -p changeme user info --id 3
    undefined method `key?' for #<JSON::Ext::Generator::State:0x000000102d9c80>

Associated revisions

Revision ecac9440
Added by Thomas McKay over 3 years ago

fixes #6003 - don't render user default loc/org object directly

History

#1 Updated by Eric Helms over 3 years ago

  • Target version set to Sprint 32
  • Triaged changed from No to Yes

#2 Updated by Eric Helms over 3 years ago

  • Category changed from Hammer to API
  • Assigned To set to Thomas McKay
  • Target version changed from Sprint 32 to Sprint 33

#3 Updated by Og Maciel over 3 years ago

So the issue seems to happen once you add a new user... while you have the original and hidden users, the command works fine:

# hammer -u admin -p changeme user list
---|---------------|------------|----------------------------
ID | LOGIN         | NAME       | EMAIL
---|---------------|------------|----------------------------
1  | admin         | Admin User | root@idm.lab.bos.redhat.com
2  | hidden-kanvyp |            | yMUaG235CL@localhost
---|---------------|------------|----------------------------
# hammer -u admin -p changeme user info --id 1
Id:            1
Login:         admin
Name:          Admin User
Email:         root@idm.lab.bos.redhat.com
Admin:         yes
Authorized by: Internal
Last login:    2014/06/16 14:49:43
Created at:    2014/06/13 17:03:20
Updated at:    2014/06/16 14:49:43

After I added a third user:

# hammer -u admin -p changeme user list
undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000f78c878>

#4 Updated by Thomas McKay over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1110337

#5 Updated by Thomas McKay over 3 years ago

  • Project changed from Katello to Foreman
  • Category changed from API to API
  • Status changed from New to Assigned
  • Target version deleted (Sprint 33)

#6 Updated by Dominic Cleal over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to Sprint 25

#7 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.5.2

#8 Updated by Thomas McKay over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF