The IPrincipalDeleted event is never notified. As a matter of fact,
this would be useful to be able to trigger some cleanup in various
plugins, when user data has to be cleaned up.
(FYI the PrincipalCreated event has a nice high level API _doAddUser
that triggers IPrincipalCreated but no high level API for deletion)
PAS also provides an IUserAdderPlugin interface for plugins that adds users.
For deletion, I would like to do some changes into PAS:
- add a IUserRemoverPlugin interface that adds a removeUser *or*
rename IUserAdderPlugin to IUserManagerPlugin, but the latter
would involve a lot of trouble i think
- make ZODBUserManager implements it
- add a notify(PrincipalDeleted(user_id)) in ZODBUserManager
This would be helpfull to catch the event in various plugins
My final goal is to make sure user properties are cleaned up in
PlonePAS when a user is removed.
Wichert's feedback on this:
I'ld also define a new interface for acl_users which supports mutable
users and groups. The current one (which PAS implements) is read-only by
design. That is also why _addUser is not defined in an interface
anywhere and starts with an underscore.
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
Zope-PAS mailing list