Red Hat Bugzilla – Bug 1099988
User mail address should either be always optional or always required
Last modified: 2016-07-27 04:40:49 EDT
Description of problem: When creating a user the --mail option is not required but when updating it is. Version-Release number of selected component (if applicable): hammer (0.1.0) * hammer_cli_foreman (0.1.0) * hammer_cli_katello (0.0.3) How reproducible: Aways Steps to Reproduce: 1. # hammer user create --login testuser --password userpasswd --auth-source-id 1 User created 2. # hammer user list --per-page 10000 | grep testuser 48 | testuser | | 3. # hammer user update --id 48 --login usertest Could not update the user: Email address can't be blank 4. # hammer user update --id 48 --login usertest --mail test@user.com User updated 5. # hammer user list --per-page 10000 | grep "48 " 48 | usertest | | test@user.com Actual results: Expected results: If the --mail is required on creation then should ensure that it is filled on update. But if it is not required on creation it should be not required when updating. Additional info:
This is currently by design, so an admin can create a user without an e-mail address and they're forced to update it on their first login. I'm not sure that's a great design though and would prefer to simply make it optional.
Created redmine issue http://projects.theforeman.org/issues/5897 from this bug
*** Bug 1111649 has been marked as a duplicate of this bug. ***
*** Bug 1110314 has been marked as a duplicate of this bug. ***
*** Bug 1192337 has been marked as a duplicate of this bug. ***
Upstream bug assigned to tcaspy@redhat.com
Moving to POST since upstream bug http://projects.theforeman.org/issues/5897 has been closed ------------- Tom Caspy Applied in changeset commit:564b322f82ec9c4b8f6d4d1b9be82c71c801c16d.
This is still present in 6.1.1
Verified in Upstream. While creating user it forcefully asked for email to enter: [root@qeblade36 ~]# hammer user create --login testuser --password userpasswd --auth-source-id 1 Could not create the user: Missing arguments for 'user[mail]' Also observed this, email id as '': (Somewhat doubtful, If this is a bug please reopen this bug) [root@qeblade36 ~]# hammer user create --login testuser --password userpasswd --auth-source-id 1 --mail '' User [testuser] created And, when email was nil(Also when email exist), while updating user it didn't forced me to enter email: [root@qeblade36 ~]# hammer user list ---|----------|------------|-------------------------------- ID | LOGIN | NAME | EMAIL ---|----------|------------|-------------------------------- 3 | admin | Admin User | root@rhq.lab.eng.bos.redhat.com 4 | testuser | | ---|----------|------------|-------------------------------- [root@qeblade36 ~]# hammer user update --id 4 --login usertest User [usertest] updated So, moving the bug to verified state. Versions tested on: foreman-release-1.10.0-0.develop.201509071606gitfd06f4f.el7.noarch foreman-1.10.0-0.develop.201509071606gitfd06f4f.el7.noarch
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/RHBA-2016:1500