开发者

Subscriber when a group is assigned to an user

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜