[Product-Developers] plone.formwidget.masterselect from svn trunk

SauZheR sauzher at gmail.com
Tue Mar 13 14:41:59 UTC 2012


thanks maurits for your answer.

This is full traceback: http://pastebin.com/rs9hUEtp.
I agree with you about python version. I will try with the 2.6.

About the permission....
I disagree. Actually many use cases cover anonymous form fill and does not
necessary have to fire content creation: often an email, or an sql
statement is enough.

Moreover, this browser view is only a json-wrapper for some vocabulary. Its
purpose is retrieving filtered data to populate a widget. It does not have
to know in which context it will be called.

The vocabulary utility is registered without permission directive, and I
can make a widget use this source naturally even by anonymous. So why to
restrict in case of slave-field?

I mean i know i can check-out all that stuff and change what i want. It's
what i've done. But i think this product should cover more general use cases

alessandro.

2012/3/13 Maurits van Rees <m.van.rees at zestsoftware.nl>

> Op 13-03-12 13:30, SauZheR schreef:
>
>> in main configure.zcml
>>
>>  1. [...]
>>  2. <!-- Include our dependencies -->
>>  3. <includeDependencies package="." />
>>  4.
>>
>>  5. <adapter factory=".widget.**MasterSelectFieldWidget" />
>>  6. <adapter factory=".widget.**MasterSelectBoolFieldWidget" />
>>  7.
>>
>>  8. <browser:page
>>  9.          for=".interfaces.**IMasterSelectWidget"
>> 10.          name="masterselect-jsonvalue"
>> 11.          class=".widget.**MasterSelectJSONValue"
>> 12.          permission="cmf.**AddPortalContent"
>> 13.          />
>>
>>
>>
>> line 3.
>> what is that? With this line my zope does not start at all. it reports
>> "dict are not hashable". (python 2.7, plone4.1)
>> If I comment out it, simply, all works fine. Product is installable,
>> usable, enjoyable.
>>
>
> Python 2.7 is not officially supported, though anything that does not work
> with this version should be considered a bug worth reporting (and fixing).
>  I doubt that is the problem here though.
>
> The includeDependencies line makes sure that the zcml of the dependencies
> defined in setup.py is loaded.  It would be strange if loading that zcml
> fails.  Do you have a full traceback from starting Zope in the foreground?
>  I guess there is an error in one of the dependencies; maybe you need a
> newer (or older) version.
>
>
>
>
>> line 12.
>> why addPortalContent is required to retrieve some data (often from
>> public vocabulary)? I think this should be relaxed to a more comfortable
>> zope2.View (or public?)
>>
>
> I have not looked at this package myself, but I guess this browser view is
> normally only used in an add or edit form and may make no sense for
> anonymous users or users with only a View permission.
>
>
> --
> Maurits van Rees: http://maurits.vanrees.org/
> Zest Software: http://zestsoftware.nl
>
> ______________________________**_________________
> Product-Developers mailing list
> Product-Developers at lists.**plone.org <Product-Developers at lists.plone.org>
> https://lists.plone.org/**mailman/listinfo/plone-**product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>



-- 
  bye
SauZheR
************************************
l'iterazione è umana...
la ricorsione, Divina!
************************************
reply to: sauzher AT gmail DOT com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20120313/2462e592/attachment.html>


More information about the Product-Developers mailing list