<div dir="ltr"><div><div>Hi,<br><br>The various plugins interfaces references are hardcoded in most PAS/PlonePas API services. So adding the support of a new plugin interface qill require to subclass or monkey patch PAS or PlonePAS (depending on what API you need to change).<br>
<br>Perhaps I'm wrong or I didn't understand your issue, but wouldn't it be easier and safer to subclass or monkey patch the PloneLDAP plugins to limit the number of results of users enumeration ?<br><br></div>
Cheers<br>-- <br></div>Gilles Lenfant<br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/18 Sean Upton <span dir="ltr"><<a href="mailto:sdupton@gmail.com" target="_blank">sdupton@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey folks,<br>
<br>
I want to be able to implement a custom PAS plugin type -- for user<br>
enumeration by add-ons, not by Plone's core.  I want to subclass<br>
IUserEnumerationPlugin and use the subclass as a distinct key (e.g.<br>
acl_users.listPlugins(IMyLimitedDirectoryEnumerationPlugin).<br>
<br>
While it is easy to create and register custom plugins, registering<br>
custom plugin types seems more difficult, due to lack of public<br>
interfaces in PluginRegistry and a global hardcoded _PLUGIN_TYPE_INFO<br>
tuple in PAS.<br>
<br>
My use case is a very large LDAP directory (100k+ users) I want to<br>
incidentally search in my add-ons (event invitations, finding users to<br>
register into group collaboration system);  I do not want to enable<br>
search/enumeration in Plone's core user management (this directory<br>
would only be used for authentication and user properties, otherwise).<br>
<br>
Is it reasonable to monkey-patch<br>
Products.PluggableAuthService.PluggableAuthService._PLUGIN_TYPE_INFO<br>
and modify acl_users.plugins._plugin_types and<br>
acl_users.plugins._plugin_type_info in a migration to accomplish my<br>
goal of having a custom plugin type?  Is there a better solution that<br>
I am just not seeing?<br>
<br>
Sean<br>
_______________________________________________<br>
Product-Developers mailing list<br>
<a href="mailto:Product-Developers@lists.plone.org">Product-Developers@lists.plone.org</a><br>
<a href="https://lists.plone.org/mailman/listinfo/plone-product-developers" target="_blank">https://lists.plone.org/mailman/listinfo/plone-product-developers</a><br>
</blockquote></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><br></blockquote><br>
</div></div>