URL:
https://github.com/freeipa/freeipa/pull/3739
Author: flo-renaud
Title: #3739: ipa user_add: do not check group if UPG is disabled
Action: opened
PR body:
"""
### ipa user_add: do not check group if UPG is disabled
The UPG plugin is used to create a user private group when a new IPA user is created, with
the same name as the user. When this plugin is enabled, the user creation must ensure that
no group exists with the same name.
When the UPG plugin is disabled, or when the user is created with the --noprivate option,
there is no need to perform this check as the private group will not get created.
Currently, the --noprivate option correctly skips the test, but a disabled UPG plugin does
not skip the test. The fix ensures that UPG plugin status is checked.
Fixes:
https://pagure.io/freeipa/issue/4972
### ipatests: add XMLRPC test for user-add when UPG plugin is disabled
Add a new XMLRPC test in test_user_plugin:
- disable the UPG plugin
- create a user without the --gid parameter
as the default group for new users is not POSIX (ipausers), the command is expected to
fail
- create a user with the --gid parameter
The provided gid is used and command is expected to succeed
- create a user with the same name as an existing group
As the UPG plugin is disabled, the user creation will not trigger the creation of a
group with the same name, and command is expected to succeed
- re-enable the UPG plugin for other tests
Related to:
https://pagure.io/freeipa/issue/4972
"""
To pull the PR as Git branch:
git remote add ghfreeipa
https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3739/head:pr3739
git checkout pr3739