#8894 LDAPQuery doesn't call pre/post/exc callbacks
Opened 2 years ago by rcritten. Modified 2 years ago

Issue

I don't remember if this is a design decision or not but it seems strange that LDAPQuery doesn't call any callbacks. It's possible to register callbacks but they just aren't run at all.

Typically the class contains:

        for callback in self.get_callbacks('pre'):
            dn = callback(self, ldap, dn, attrs_list, *keys, **options)
            assert isinstance(dn, DN)

        <work, perhaps the exc callback>

        for callback in self.get_callbacks('post'):
            entry_attrs.dn = callback(
                self, ldap, entry_attrs.dn, entry_attrs, *keys, **options)

But LDAPQuery doesn't define its own execute (so also not LDAPMultiQuery)

So this ticket is for two purposes:

  1. investigate why this is not used and perhaps implement it
  2. if we decide not to see if we can reject pre/post registrations if they aren't going to run

Login to comment on this ticket.

Metadata