Bug 1099988 - User mail address should either be always optional or always required
Summary: User mail address should either be always optional or always required
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Ohad Levy
QA Contact: Jitendra Yejare
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1110314 1111649 1192337 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-21 17:59 UTC by Elyézer Rezende
Modified: 2019-09-25 21:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:40:49 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 5897 None None None 2016-04-22 15:58:23 UTC
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Elyézer Rezende 2014-05-21 17:59:02 UTC
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:

Comment 2 Dominic Cleal 2014-05-23 07:22:25 UTC
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.

Comment 3 Dominic Cleal 2014-05-23 07:23:00 UTC
Created redmine issue http://projects.theforeman.org/issues/5897 from this bug

Comment 5 Dominic Cleal 2014-06-24 15:36:04 UTC
*** Bug 1111649 has been marked as a duplicate of this bug. ***

Comment 6 Dominic Cleal 2014-06-25 06:48:33 UTC
*** Bug 1110314 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2015-02-15 15:59:51 UTC
*** Bug 1192337 has been marked as a duplicate of this bug. ***

Comment 8 Bryan Kearney 2015-02-18 23:02:16 UTC
Upstream bug assigned to tcaspy@redhat.com

Comment 9 Bryan Kearney 2015-07-20 16:00:40 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5897 has been closed
-------------
Tom Caspy
Applied in changeset commit:564b322f82ec9c4b8f6d4d1b9be82c71c801c16d.

Comment 10 Fred van Zwieten 2015-08-17 08:33:36 UTC
This is still present in 6.1.1

Comment 11 Jitendra Yejare 2015-09-09 11:13:03 UTC
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

Comment 15 errata-xmlrpc 2016-07-27 08:40:49 UTC
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


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