Avoid an error if ipadefaultemaildomain is not defined#1289
Open
proxyconcept wants to merge 1 commit intofreeipa:masterfrom
Open
Avoid an error if ipadefaultemaildomain is not defined#1289proxyconcept wants to merge 1 commit intofreeipa:masterfrom
proxyconcept wants to merge 1 commit intofreeipa:masterfrom
Conversation
The IPA configuration "ipadefaultemaildomain" is optional (in this case the key don't exist)
Member
|
@proxyconcept Thanks for the PR. |
Member
|
In my opinion, the default e-mail domain configuration is broken on FreeIPA side (https://pagure.io/freeipa/issue/9680). I suggest we wait for a decision/fix there before we change anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The IPA configuration
ipadefaultemaildomainis optional (in this case, the key don't exist).It's usefull to unset the default email domain, because it disables the auto-generation of an email address when creating a new user. But when we have this type of configuration, the module
ipauseralways failed (with or without email) :While it's permitted by the FreeIPA server to have no default email domain, the module assumes that there must be one configured.
This PR simply check if this parameter exists. If not, AND if ever the module is called with a "short" email address that needs to be extended, so no miracle : it will failed with a message like this
But in this case I think it is a legitimate failure (the request is not compatible with the server configuration) and the message remains relatively understandable.