mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-15 19:01:55 -06:00
9960149e3f
Fix several problems with the callback interface: - Automatically registered callbacks (i.e. methods named exc_callback, pre_callback etc) were registered on every instantiation. Fix: Do not register callbacks in __init__; instead return the method when asked for it. - The calling code had to distinguish between bound methods and plain functions by checking the 'im_self' attribute. Fix: Always return the "default" callback as an unbound method. Registered callbacks now always take the extra `self` argument, whether they happen to be bound methods or not. Calling code now always needs to pass the `self` argument. - Did not work well with inheritance: due to the fact that Python looks up missing attributes in superclasses, callbacks could get attached to a superclass if it was instantiated early enough. * Fix: Instead of attribute lookup, use a dictionary with class keys. - The interface included the callback types, which are LDAP-specific. Fix: Create generic register_callback and get_callback mehods, move LDAP-specific code to BaseLDAPCommand Update code that calls the callbacks. Add tests. Remove lint exceptions for CallbackInterface. * https://fedorahosted.org/freeipa/ticket/2674 |
||
---|---|---|
.. | ||
__init__.py | ||
objectclasses.py | ||
test_attr.py | ||
test_automember_plugin.py | ||
test_automount_plugin.py | ||
test_baseldap_plugin.py | ||
test_batch_plugin.py | ||
test_cert.py | ||
test_config_plugin.py | ||
test_delegation_plugin.py | ||
test_dns_plugin.py | ||
test_group_plugin.py | ||
test_hbac_plugin.py | ||
test_hbacsvcgroup_plugin.py | ||
test_hbactest_plugin.py | ||
test_host_plugin.py | ||
test_hostgroup_plugin.py | ||
test_krbtpolicy.py | ||
test_nesting.py | ||
test_netgroup_plugin.py | ||
test_passwd_plugin.py | ||
test_permission_plugin.py | ||
test_privilege_plugin.py | ||
test_pwpolicy_plugin.py | ||
test_replace.py | ||
test_role_plugin.py | ||
test_selfservice_plugin.py | ||
test_selinuxusermap_plugin.py | ||
test_service_plugin.py | ||
test_sudocmd_plugin.py | ||
test_sudocmdgroup_plugin.py | ||
test_sudorule_plugin.py | ||
test_user_plugin.py | ||
xmlrpc_test.py |