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.
Bug 783425 - Getting account disable value as 'none' instead of 'false' after creating new user
Summary: Getting account disable value as 'none' instead of 'false' after creating new...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2012-01-20 11:34 UTC by Sachin Ghai
Modified: 2019-09-26 13:29 UTC (History)
1 user (show)

Fixed In Version: katello-cli-0.1.49-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:21:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2012-01-20 11:34:24 UTC
Description of problem:
By default, account "disable" option should be set as 'false'. However when I created a new user without explicitly setting --disabled option set this value to 'None' . I guess this should be a boolean value either true or false.

katello> user create --username testuser --password redhat --email testuser
Successfully created user [ testuser ]
katello> user list 
----------------------------------------------------------------------------
                                 User List

 Id   Username   Email                Disabled  
----------------------------------------------------------------------------
 1    admin      root@localhost       False     
 2    reader     sghai     False     
 3    testuser   testuser   None      



Help text says: default is 'false'.

katello> user create --help
Usage: katello [options]

Options:
  -h, --help           show this help message and exit
  -g                   grep friendly output
  -v                   verbose, more structured output
  -d DELIMITER         grep friendly output column delimiter
  --username=USERNAME  user name (required)
  --password=PASSWORD  initial password (required)
  --email=EMAIL        email (required)
  --disabled=DISABLED  disabled account (default is 'false')
katello> 


Version-Release number of selected component (if applicable):
[root@dhcp201-112 f15]# rpm -qa | grep -ie katello-0 -ie katello-cli
katello-cli-common-0.1.39-1.el6.noarch
katello-0.1.185-1.el6.noarch
katello-cli-0.1.39-1.el6.noarch
[root@dhcp201-112 f15]# 


How reproducible:
always

Steps to Reproduce:
1. create user from cli
2. user list
3.
  
Actual results:
getting account disable value as 'none' instead of 'false' after creating new user

Expected results:
By default, account "disable" option should be set as 'false' as per help text. 


Additional info:

Comment 1 Tomas Strachota 2012-01-30 14:25:59 UTC
Default value of option --disabled set to False in both user create and update.

Comment 2 Sachin Ghai 2012-02-02 11:25:36 UTC
Verified with following katello build:

katello-0.1.211-1.el6.noarch
katello-cli-0.1.49-1.el6.noarch


Default value is set to false:
=====================

katello> user create --username testuser --password redhat --email sghai 
Successfully created user [ testuser ]


katello> user list 
--------------------------------------------------------------------------
                                User List

 Id   Username   Email              Disabled  
--------------------------------------------------------------------------
 1    admin      root@localhost     False     
 2    testuser   sghai   False 


Update the disabled value from true:
===================================

katello> user create --username testuser1 --password redhat --email sghai --disabled=true
Successfully created user [ testuser1 ]


katello> user list 
--------------------------------------------------------------------------
                                User List

 Id   Username   Email              Disabled  
--------------------------------------------------------------------------
 1    admin      root@localhost     False     
 2    testuser   sghai   False     
 3    testuser1  sghai   True      


katello> user update --username testuser1 --password redhat --email sghai
Successfully updated user [ testuser1 ]
katello> user list 
--------------------------------------------------------------------------
                                User List

 Id   Username   Email              Disabled  
--------------------------------------------------------------------------
 1    admin      root@localhost     False     
 2    testuser   sghai   False     
 3    testuser1  sghai   False


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