Op 21-02-11 11:55, Yuri schreef:
Hi all!
which is the main difference betweeen zope.View and zope2.View? Which
should we use, for example, in a browser:view/page? Thank you very much.
The main difference is that zope.View does not exist. :-) At least I
could not find it. Grepping through (part of) the plone source code I
only found zcml that used zope2.View. So in Plone code (at least 2.5,
3, 4) you definitely need zope2.View.
For Zope 2.12 the standard permissions are defined in
AccessControl/permissions.zcml
For earlier zopes (at least 2.10) it is in Products/Five/permissions.zcml
Note that the public permission to make something available for
anonymous visitors as well *is* called zope.Public, so without a '2'.
But I see that Zope2/utilities/skel/etc/site.zcml redefines zope2.Public
to zope.Public, which might be for backwards compatibility reasons. It
looks like that makes the zope2.Public permission undefined, but that
may be a misinterpretation by me.
So:
- use zope.Public for browser pages that are allowed for all visitors
- use zope2.View for browser pages that are only for visitors with the
'View' permission.
--
Maurits van Rees
Web App Programmer at Zest Software: http://zestsoftware.nl
Personal website: http://maurits.vanrees.org/
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/product-developers