[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/ZPTPage - ZPTPage.py:1.1.2.6 zptpage.zcml:1.1.2.8
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:42 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/ZPTPage
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/OFS/Content/ZPTPage
Modified Files:
Tag: Zope-3x-branch
ZPTPage.py zptpage.zcml
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals):
- RenameAllowToRequire
- GroupClassRelatedDirectivesInClassDirective
- ViewInterfaceAndSimplification
- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes
- TwoArgumentViewConstructors
- ImplementsInZCML
- SimpleViewCreationInZCML
- RemoveGetView
- ReplaceProtectWithAllow
- ViewMethodsAsViews
- MergeProtectionAndComponentDefinitions
There were also various security fixes resulting of better integration
of security with components.
=== Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/ZPTPage.py 1.1.2.5 => 1.1.2.6 ===
from Zope.Proxy.ContextWrapper import getWrapperContainer
from Zope.Security.Proxy import ProxyFactory
-from Zope.App.OFS.Content.IHTMLContent import IHTMLContent
+from Zope.App.OFS.Content.IFileContent import IFileContent
class IZPTPage(Interface):
"""ZPT Pages are a persistent implementation of Page Templates.
@@ -59,8 +59,8 @@
class ZPTPage(AppPT, PageTemplate, Persistent):
- # XXX Putting IHTMLContent at the end gives an error!
- __implements__ = IHTMLContent, IZPTPage, IRenderZPTPage
+ # XXX Putting IFileContent at the end gives an error!
+ __implements__ = IFileContent, IZPTPage, IRenderZPTPage
############################################################
# Implementation methods for interface
=== Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/zptpage.zcml 1.1.2.7 => 1.1.2.8 ===
>
- <zmi:factoryFromClass name="ZPTPage"
- class=".ZPTPage."
- permission_id="Zope.ManageContent"
- title="ZPT Page"
- description="A simple, content-based Page Template" />
-
-
- <security:protectClass class=".ZPTPage."
- permission_id="Zope.View">
- <security:protect
- names="content_type, __call__"
- permission_id="Zope.View" />
- <security:protect
- interface=".ZPTPage.IZPTPage"
- permission_id="Zope.ManageContent" />
- <security:protect
- interface=".ZPTPage.IRenderZPTPage"
- permission_id="Zope.View" />
- </security:protectClass>
+ <content class=".ZPTPage.">
+ <zmi:factory
+ id="ZPTPage"
+ permission="Zope.ManageContent"
+ title="ZPT Page"
+ description="A simple, content-based Page Template" />
+ <security:require permission="Zope.View"
+ attributes="content_type __call__" />
+
+ <security:require permission="Zope.ManageContent"
+ interface=".ZPTPage.IZPTPage" />
+ <security:require permission="Zope.View"
+ interface=".ZPTPage.IRenderZPTPage" />
+ </content>
<adapter
@@ -35,15 +30,14 @@
<!-- tabs for ZPT Page -->
<zmi:tabs for=".ZPTPage.IZPTPage.">
- <zmi:tab label="Edit" action="edit;view"/>
+ <zmi:tab label="Edit" action="editForm.html"/>
<zmi:tab label="View" action=""/>
<!-- XXX This isn't working
- <zmi:tab label="Role Permissions" action="RolePermissionsManagement;view"/>
+ <zmi:tab label="Role Permissions"
+ action="AllRolePermissions.html"/>
-->
</zmi:tabs>
<include package=".Views" file="views.zcml" />
-
-
</zopeConfigure>