[Zope-PAS] Writeable property sheets
jh at improva.dk
Sun Oct 17 07:11:06 EDT 2004
Hello PAS developers.
I am trying to figure out how to create a plugin that allows writeable
property sheets. It appears that the IUpdatePlugin and IValidationPlugin
interfaces were intended to support some form of writeable properties
but they do not seem to be used anywhere. The only way i can see is to
create a IUserFactoryPlugin, just to override the addPropertysheet
method to use a custom IPropertySheet implementation. This seems like a
lot of work for something that should be simple.
To fix this I suggest adding an IPropertysheetFactoryPlugin interface
along these lines:
class IPropertysheetFactoryPlugin( Interface ):
""" Create a new IPropertySheet.
def createPropertysheet( sheet_id, data ):
""" Return an IPropertySheet, if possible.
o Return None to allow another plugin, or the default to fire.
And letting PropertiedUser grow a _addPropertysheet method:
def _addPropertysheet( self, id, sheet ):
""" Add a new propertysheet.
o sheet must implement IPropertySheet
self._propertysheets[ id ] = sheet
And changing PluggableAuthService to use the new interfaces.
Would anyone care to comment?
P.S. Has anyone else noticed the inconsistent choice of upper/lowercase
used for the 's' in propertysheet?
More information about the Zope-PAS