[Zope-PAS] mutable property sheets

Jens Vagelpohl jens at dataflake.org
Sun Apr 16 11:26:40 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 16 Apr 2006, at 16:48, Wichert Akkerman wrote:

> Is there any reason not to merge the MutablePropertySheets from  
> PlonePAS
> into PAS? The implementation is quite trivial:
>
> http://dev.plone.org/collective/browser/PlonePAS/trunk/interfaces/ 
> propertysheets.py
> https://dev.plone.org/collective/browser/PlonePAS/trunk/sheet.py
> https://dev.plone.org/collective/browser/PlonePAS/trunk/plugins/ 
> property.py

A couple things I noticed:

- - IMutablePropertiesPlugin.getPropertiesForUser deviates from the  
original contract in IPropertiesPlugin.getPropertiesForUser and  
returns a property sheet object instead of a mapping. IMHO it should  
return a mapping.

- - IPropertiesPlugin.setPropertiesForUser claims to only accept a  
propertysheet object, but it would probably work fine with a simple  
mapping (eyeballing the implementation in the  
ZODBMutablePropertyProvider class). The contract could be changed to  
accept mappings.

- - setting properties on a user will magically turn around and persist  
the change. This would be the first user folder I have seen where  
this happens. Personally, I'm a bit uncomfortable with this magic.

Just my 2 ¢.

jens

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEQmIxRAx5nvEhZLIRApvDAJ0f/T021SNDzq+sgVSMNaRKCotTXwCdFy1W
ScpwyruPB0bhk2XAomp5rX8=
=1Mxw
-----END PGP SIGNATURE-----


More information about the Zope-PAS mailing list