Project

General

Profile

Bug #5666

Cannot set default_organization_id at user creation

Added by dustin tsang about 8 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

https://bugzilla.redhat.com/show_bug.cgi?id=1092656

Created attachment 890865 [details]
part of /var/log/foreman/production.log

Description of problem:
Creation of an user via API with default_organization_id set fails with 500 ISE.

Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140423.1-Satellite-x86_64-dvd1.iso

How reproducible:
always

Steps to Reproduce:
1. Run @api.resource(:users).call(:create, user_hash) with following user_hash:
user_hash = {
:login => "newuser",
:firstname => "user",
:lastname => "new",
:mail => "root@localhost",
:auth_source_id => 1,
:password => "password",
:organization_ids => [13],
:default_organization_id => 13,
:location_ids => [],
:role_ids => [],
}

Actual results:
Creation of user failed with: 500 Internal Server Error: {
"error": {"message":"undefined method `key?' for #<JSON::Ext::Generator::State:0x007f696cecadd8>"}
}
but the user was created!

Expected results:
no exceptions or ISEs

Additional info:
- creating of the user without default_organization_id works and setting it using the user update API afterwards works as well


Related issues

Is duplicate of Foreman - Bug #5750: Cannot set default_organization_id at user creation Rejected2014-05-15

History

#1 Updated by Dominic Cleal almost 8 years ago

  • Is duplicate of Bug #5750: Cannot set default_organization_id at user creation added

#2 Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Duplicate

#3 Updated by Eric Helms almost 8 years ago

  • Target version set to 44

#4 Updated by Eric Helms almost 8 years ago

  • Triaged changed from No to Yes

#5 Updated by Eric Helms over 7 years ago

  • Legacy Backlogs Release (now unused) set to 13

#6 Updated by Eric Helms about 7 years ago

  • Legacy Backlogs Release (now unused) deleted (13)

#7 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF