-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipauser: Make return value depending on users parameter #1053
ipauser: Make return value depending on users parameter #1053
Conversation
The way how randompasswords are returned by the ipauser module depends so far on the number of users that are handled by the module. This is unexpected if for example a json file is provided with the users parameter. As it might be unknown how many users are in the json file, this behaviour is unexpected. The return should not vary in this case. This chamge makes the return simply depend on the use of the users paramater. As soon as this parameter is used, the return will always be: "user": { "<the user>": { "randompassword": "<the user random password>" } } In the simply case with one user it will be still "user": { "randompassword": "<the user random password>" } Fixes: freeipa#1052 (ipauser should consitently return randompasswords when used with users)
It should be possible to return additionally |
Additionally fix "Ensure users pinky and brain are present with a generated random password and print the random passwords:" in README-user.md. This is missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
The existing downstream tests passed with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The way how randompasswords are returned by the ipahost module depends so far on the number of hosts that are handled by the module. This is unexpected if for example a json file is provided with the hosts parameter. As it might be unknown how many hosts are in the json file, this behaviour is unexpected. The return should not vary in this case. This chamge makes the return simply depend on the use of the hosts paramater. As soon as this parameter is used, the return will always be: "host": { "<the host>": { "randompassword": "<the host random password>" } } In the simply case with one host it will be still "host": { "randompassword": "<the host random password>" } This change for ipahost is related to the ipauser PR freeipa#1053. Related: freeipa#1052 (ipauser should consitently return randompasswords when used with users)
The way how randompasswords are returned by the ipahost module depends so far on the number of hosts that are handled by the module. This is unexpected if for example a json file is provided with the hosts parameter. As it might be unknown how many hosts are in the json file, this behaviour is unexpected. The return should not vary in this case. This chamge makes the return simply depend on the use of the hosts paramater. As soon as this parameter is used, the return will always be: "host": { "<the host>": { "randompassword": "<the host random password>" } } In the simply case with one host it will be still "host": { "randompassword": "<the host random password>" } This change for ipahost is related to the ipauser PR freeipa#1053.
The way how randompasswords are returned by the ipahost module depends so far on the number of hosts that are handled by the module. This is unexpected if for example a json file is provided with the hosts parameter. As it might be unknown how many hosts are in the json file, this behaviour is unexpected. The return should not vary in this case. This chamge makes the return simply depend on the use of the hosts paramater. As soon as this parameter is used, the return will always be: "host": { "<the host>": { "randompassword": "<the host random password>" } } In the simply case with one host it will be still "host": { "randompassword": "<the host random password>" } This change for ipahost is related to the ipauser PR freeipa#1053.
The way how randompasswords are returned by the ipauser module depends so far on the number of users that are handled by the module.
This is unexpected if for example a json file is provided with the users parameter. As it might be unknown how many users are in the json file, this behaviour is unexpected. The return should not vary in this case.
This chamge makes the return simply depend on the use of the users paramater. As soon as this parameter is used, the return will always be:
"user": { "<the user >": { "randompassword": "<the user random password>" } }
In the simply case with one user it will be still
"user": { "randompassword": "<the user random password>" }
Fixes: #1052 (ipauser should consitently return randompasswords when
used with users)