mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 08:21:05 -06:00
4f03aed5e6
We prevent the last member of the admin group from being deleted. The same check needs to be performed when disabling a user. * Moved the code in del_user to the common subroutine check_protected_member() and call it from both user_del and user_disable. Note, unlike user_del user_disable does not have a 'pre' callback therefore the check function is called in user_disable's execute routine. * Make check_protected_member() aware of disabled members. It's not sufficient to check which members of the protected group are present, one must only consider those members which are enabled. * Add tests to test_user_plugin.py. - verify you cannot delete nor disable the last member of the admin group - verify when the admin group contains disabled users in addition to enabled users only the enabled users are considered when determining if the last admin is about to be disabled or deleted. * Replace duplicated hardcoded values in the tests with variables or subroutines, this makes the individual tests a bit more succinct and easier to copy/modify. * Update error msg to reflect either deleting or disabling is an error. https://fedorahosted.org/freeipa/ticket/2979 |
||
---|---|---|
.. | ||
plugins | ||
__init__.py | ||
aci.py | ||
backend.py | ||
base.py | ||
cli.py | ||
config.py | ||
constants.py | ||
crud.py | ||
errors.py | ||
frontend.py | ||
krb_utils.py | ||
output.py | ||
parameters.py | ||
pkcs10.py | ||
plugable.py | ||
request.py | ||
rpc.py | ||
session.py | ||
text.py | ||
util.py | ||
x509.py |