When assigning a user to a group, is it possible to call a subscriber? Are there available events to this action? If so, in which product?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. It does not appear that Products.PluggableAuthService.plugins.ZODBGroupManager.ZODBGroupManager.addPrincipalToGroup nor anything that calls it notifies any event.
I would suggest that if you have an add-on that needs this:
(1) Submit a feature request ticket at https://dev.plone.org — it would be nice to have this, I am pretty sure that I could use it too.
(2) For now, have your add-on monkey patch ZODBGroupManager.addPrincipalToGroup() method wrapping the original function with an event notification of your own devising called after the user is added to the group. https://stackoverflow.com/search?q=monkey+patch+python