Project

General

Profile

Actions

Bug #4007

closed

Users email is not mandatory on creation but it is on update

Added by Daniel Lobato Garcia over 10 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
easy
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

https://github.com/theforeman/foreman/blob/develop/app/models/user.rb#L39

This is rather odd as it allows users to not have a mail, but if you edit them you are forced to set an email.

Actions #1

Updated by Dominic Cleal over 10 years ago

It's a bit weird, but I think it's meant so a user can be created from some external auth source without an e-mail address, but then they're forced to set one on login. However this currently also applies to the admin if they edit the user again, so perhaps it should still be optional if an admin is saving the user? Or it just needs redesigning.

Actions #2

Updated by Daniel Lobato Garcia over 10 years ago

If nothing depends on it, I'd fully remove the validator. I guess it won't wreck anything since there already could be users without email.

Actions #3

Updated by Dominic Cleal over 10 years ago

The only thing that would use it are the e-mails on failed reports (to the owner), so check there's a fallback or at least graceful exit in these cases. We could keep the validator, but permit an empty e-mail address too.

Actions #4

Updated by Lukas Zapletal over 10 years ago

I have entering an email address everywhere - e.g. I am evaluating a software, I know I will not be sending any reports and I need to enter it. I vote for optional e-mail address and changing our sender helper. If the e-mail provided was nil, let's just put warning in logs and skip the send.

Actions #5

Updated by John Julien about 10 years ago

+1 for optional

Actions #7

Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9279 added
Actions #8

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.4.0 added
Actions #9

Updated by Nofar Alfassi over 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #10

Updated by Amit Upadhye over 1 year ago

  • Category set to Users, Roles and Permissions
  • Assignee set to Nofar Alfassi
Actions

Also available in: Atom PDF