hi,

i'm working on implementing the Plone member data as user properties, but have hit a snag b/c PAS doesn't recognize images as a possible property type. in the short term, does anyone object (with an alternate proposal, ideally) to the following patch:

Index: UserPropertySheet.py
===================================================================
--- UserPropertySheet.py        (revision 70425)
+++ UserPropertySheet.py        (working copy)
@@ -35,6 +35,8 @@

 from DateTime.DateTime import DateTime

+from OFS.Image import Image
+
 from Products.PluggableAuthService.utils import classImplements
 from Products.PluggableAuthService.interfaces.propertysheets \
     import IPropertySheet
@@ -73,6 +75,9 @@
             else:
                 raise ValueError, 'Property %s: unknown class' % k

+        elif isinstance( v, Image ):
+            ptype = 'image'
+
         elif type( v ) not in StringTypes:
             raise ValueError, 'Property %s: unknown type' % k


in the longer term, in PlonePAS there seems to be the beginning of a more flexible property sheet schema implementation. there are also a number of other niceties in PlonePAS (e.g. IMutablePropertySheet) that should probably be ported back to the PAS layer. i seem to remember hearing at some point that there were plans to merge some of this. anyone on this list know if that's true, and what the plans were?

thanks!

-r

_______________________________________________
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas

Reply via email to