Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Moving to POST since upstream bug http://projects.theforeman.org/issues/9678 has been closed
-------------
Anonymous
Applied in changeset commit:1b1b39861e485523b0cc0c6435fef30c38df7e07.
Verified against Satellite-6.1.0-RHEL-6-20150317.0 and Satellite-6.1.0-RHEL-7-20150317.0. An automated test for this bug will be added to QE's test suite shortly. See https://github.com/SatelliteQE/robottelo/pull/2004
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2015:1592
Anytime a json containing "admin" is sent via PUT on users the request fails with: <pre> undefined method `admin=' for nil:NilClass (NoMethodError) </pre> The relevant backtrace is: <pre> 2015-03-09 09:57:27 [I] Started PUT "//api/users/13" for 127.0.0.1 at 2015-03-09 09:57:27 +0000 2015-03-09 09:57:27 [I] Processing by Api::V2::UsersController#update as JSON 2015-03-09 09:57:27 [I] Parameters: {"user"=>{"admin"=>"false"}, "apiv"=>"v2", "id"=>"13"} 2015-03-09 09:57:27 [D] ESC[1mESC[36mUser Load (0.2ms)ESC[0m ESC[1mSELECT "users".* FROM "users" WHERE "users"."lower_login" = 'admin' LIMIT 1ESC[0m 2015-03-09 09:57:27 [D] ESC[1mESC[35mAuthSource Load (0.1ms)ESC[0m SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1 2015-03-09 09:57:27 [D] ESC[1mESC[36mCACHE (0.0ms)ESC[0m ESC[1mSELECT "users".* FROM "users" WHERE "users"."lower_login" = 'admin' LIMIT 1ESC[0m 2015-03-09 09:57:27 [D] Authenticated user Admin User against INTERNAL authentication source 2015-03-09 09:57:27 [D] ESC[1mESC[35mUser Load (0.1ms)ESC[0m SELECT "users".* FROM "users" WHERE "users"."lower_login" = 'foreman_admin' LIMIT 1 2015-03-09 09:57:27 [D] Setting current user thread-local variable to foreman_admin 2015-03-09 09:57:27 [D] Setting current user thread-local variable to nil 2015-03-09 09:57:27 [D] ESC[1mESC[36mCACHE (0.0ms)ESC[0m ESC[1mSELECT "users".* FROM "users" WHERE "users"."lower_login" = 'foreman_admin' LIMIT 1ESC[0m 2015-03-09 09:57:27 [D] Setting current user thread-local variable to foreman_admin 2015-03-09 09:57:27 [D] ESC[1mESC[35m (0.0ms)ESC[0m begin transaction 2015-03-09 09:57:27 [D] ESC[1mESC[36m (0.2ms)ESC[0m ESC[1mUPDATE "users" SET "last_login_on" = '2015-03-09 09:57:27.507351', "updated_at" = '2015-03-09 09:57:27.507910' WHERE "users"."id" = 1ESC[0m 2015-03-09 09:57:27 [D] ESC[1mESC[35mRole Load (0.1ms)ESC[0m SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 2015-03-09 09:57:27 [D] ESC[1mESC[36m (0.1ms)ESC[0m ESC[1mSELECT "roles".id FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User'ESC[0m 2015-03-09 09:57:27 [D] ESC[1mESC[35m (81.0ms)ESC[0m commit transaction 2015-03-09 09:57:27 [D] ESC[1mESC[36mCACHE (0.0ms)ESC[0m ESC[1mSELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1ESC[0m 2015-03-09 09:57:27 [D] ESC[1mESC[35mRole Exists (0.1ms)ESC[0m SELECT 1 AS one FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' AND "r oles"."id" = 8 LIMIT 1 2015-03-09 09:57:27 [D] Setting current user thread-local variable to nil 2015-03-09 09:57:27 [D] Setting current user thread-local variable to admin 2015-03-09 09:57:27 [D] ESC[1mESC[36mAuthSourceHidden Load (0.1ms)ESC[0m ESC[1mSELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."type" IN ('AuthSourceHidden')ESC[0m 2015-03-09 09:57:27 [D] ESC[1mESC[35mUser Load (0.1ms)ESC[0m SELECT "users".* FROM "users" WHERE "users"."lower_login" = 'admin' AND (users.auth_source_id <> 2) ORDER BY firstname LIMIT 1 2015-03-09 09:57:27 [I] Authorized user admin(Admin User) 2015-03-09 09:57:27 [D] Setting current user thread-local variable to admin 2015-03-09 09:57:27 [E] undefined method `admin=' for nil:NilClass (NoMethodError) /root/foreman/app/controllers/concerns/foreman/controller/users_mixin.rb:46:in `update_admin_flag' </pre>