On pe, 28 elo 2020, Ruslan Skira via FreeIPA-users wrote:
Hello, guys could please clarify and help me I need to add pre_callback
fo user_disable function. But this object does not have such methods.
But user_delete has.  How I should add my extra logic to this method?

Since user_disable class is built on top of LDAPQuery and that one is on
top of BaseLDAPCommand, it also has support for pre/post callbacks.

Unfortunately, user_disable.exec() doesn't use any of the callbacks at
all and does run ldap.deactivate_entry() directly.

This means no callback can be called.

Right now, the only way to get around it is to redefine
user_disable.exec() in your plugin.

A patch that adds support for callbacks in
user_disable/user_enable/user_status, similar to how it is implemented
in LDAPRetrieve class is welcome. You might need to adopt the signatures
of the callback methods to be reasonable for theese commands, of course.


--
/ Alexander Bokovoy
Sr. Principal Software Engineer
Security / Identity Management Engineering
Red Hat Limited, Finland
_______________________________________________
FreeIPA-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/[email protected]

Reply via email to