开发者

Subscriber when a group is assigned to an user

开发者 https://www.devze.com 2023-03-30 20:13 出处:网络
When assigning a user to a group, is it possible t开发者_JS百科o call a subscriber? Are there available events to this action? If so, in which product?No. It does not appear that Products.PluggableAut

When assigning a user to a group, is it possible t开发者_JS百科o call a subscriber? Are there available events to this action? If so, in which product?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消