Bug 993588 - CLI user update command sets default organization and environment to None
CLI user update command sets default organization and environment to None
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
Nightly
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Eric Helms
Ales Dujicek
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-06 04:54 EDT by Ales Dujicek
Modified: 2014-04-24 13:12 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Dujicek 2013-08-06 04:54:45 EDT
Description of problem:

when updating user's email, locale or password, user's default organization and environment is set to None:

> user create --username bob --default_organization ACME_Corporation --default_environment Library --email mail@katello --password testing
Successfully created user [ bob ]

> user info --username bob --noheading
ID                   : 110
Username             : bob
Email                : mail@katello
Disabled             : False
Default Organization : ACME_Corporation
Default Environment  : Library
Default Locale       : None

> user update --username bob --email bob@katello
Successfully updated user [ bob ]

> user info --username bob --noheading
ID                   : 110
Username             : bob
Email                : bob@katello
Disabled             : False
Default Organization : None
Default Environment  : None
Default Locale       : None


Version-Release number of selected component (if applicable):
katello-1.4.3-1.git.22.0cc1a3a.el6.noarch
katello-glue-elasticsearch-1.4.3-1.git.22.0cc1a3a.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-1.4.2-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-1.el6.noarch
signo-katello-0.0.9-1.el6.noarch
katello-glue-pulp-1.4.3-1.git.22.0cc1a3a.el6.noarch
katello-cli-1.4.3-1.git.4.e9d20cd.el6.noarch
katello-common-1.4.3-1.git.22.0cc1a3a.el6.noarch
katello-selinux-1.4.4-1.el6.noarch
katello-glue-candlepin-1.4.3-1.git.22.0cc1a3a.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.4.3-1.git.4.e9d20cd.el6.noarch
katello-configure-1.4.4-1.el6.noarch
katello-all-1.4.3-1.git.22.0cc1a3a.el6.noarch

How reproducible:
always
Comment 3 Eric Helms 2013-09-18 09:16:53 EDT
Upstream fix tracked here - https://github.com/Katello/katello/pull/2988
Comment 4 Eric Helms 2013-09-20 09:51:15 EDT
Fix available at 36940af16a4fea2cfdf17f6b490e791b35f8270a

The API was previously setting the default_environment to nil if no default_environment_id parameter was specified. The code now correctly checks if the key exists in the parameters before taking any actions.
Comment 8 Ales Dujicek 2013-10-11 04:53:09 EDT
Verified.

Satellite-6.0.2-RHEL-6-20131009.0

ruby193-rubygem-foreman-katello-engine-0.0.14-5.el6sat.noarch
katello-all-1.4.6-29.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-common-1.4.6-29.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.7-2.el6sat.noarch
katello-configure-1.4.5-10.el6sat.noarch
katello-cli-common-1.4.3-19.el6sat.noarch
signo-katello-0.0.22-2.el6sat.noarch
katello-glue-pulp-1.4.6-29.el6sat.noarch
katello-selinux-1.4.4-4.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
ruby193-rubygem-katello_api-0.0.3-4.el6sat.noarch
katello-configure-foreman-1.4.5-10.el6sat.noarch
katello-glue-candlepin-1.4.6-29.el6sat.noarch
katello-foreman-all-1.4.6-29.el6sat.noarch
katello-configure-foreman-proxy-1.4.5-10.el6sat.noarch
katello-glue-elasticsearch-1.4.6-29.el6sat.noarch
katello-certs-tools-1.4.4-1.el6sat.noarch
katello-cli-1.4.3-19.el6sat.noarch
katello-1.4.6-29.el6sat.noarch
pulp-katello-plugins-0.2-1.el6sat.noarch
katello-qpid-client-key-pair-1.0-1.noarch
Comment 11 Bryan Kearney 2014-04-24 13:11:03 EDT
This was verified and delivered with MDP2. Closing it out.
Comment 12 Bryan Kearney 2014-04-24 13:12:05 EDT
This was delivered and verified with MDP2. Closing the bug.

Note You need to log in before you can comment on or make changes to this bug.