[Zope-Checkins] CVS: Zope3 - sample_principals.zcml:1.3 site.zcml:1.5
Jim Fulton
jim@zope.com
Thu, 20 Jun 2002 11:55:15 -0400
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv15462
Modified Files:
sample_principals.zcml site.zcml
Log Message:
implemented:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/MergeSecurityIntoZopeNamespace
While I was at it, I couldn't resist implementing a variation of:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SecurityPackageReorg
which was a lot more work.
=== Zope3/sample_principals.zcml 1.2 => 1.3 ===
absolutely know it will only be used for development.
-->
-<zopeConfigure
- xmlns='http://namespaces.zope.org/zope'
- xmlns:security='http://namespaces.zope.org/security'
- xmlns:zmi='http://namespaces.zope.org/zmi'
- xmlns:browser='http://namespaces.zope.org/browser'
->
+<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
-<security:defaultPrincipal id="anybody"
+<unauthenticatedPrincipal id="anybody"
title="Unauthenticated User" />
-<security:principal id="stupid" title="Stupid, replace me"
+<principal id="stupid" title="Stupid, replace me"
login="stupid" password="123" />
-<security:principal id="idiot" title="I'm an idiot, replace me"
+<principal id="idiot" title="I'm an idiot, replace me"
login="idiot" password="456" />
-<security:assignRoleToPrincipal role="Manager" principal="stupid" />
-<security:assignRoleToPrincipal role="Member" principal="idiot" />
+<grant role="Manager" principal="stupid" />
+<grant role="Member" principal="idiot" />
</zopeConfigure>
=== Zope3/site.zcml 1.4 => 1.5 ===
- xmlns='http://namespaces.zope.org/zope'
- xmlns:security='http://namespaces.zope.org/security'
->
+<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<include package="Zope" />
-<security:role id="Manager" title="Site Manager" />
-<security:role id="Member" title="Site Member" />
+<role id="Manager" title="Site Manager" />
+<role id="Member" title="Site Member" />
<include file="principals.zcml" />
<!-- Remove the following directive if you don't want public access -->
-<security:grantPermissionToRole permission="Zope.View"
- role="Anonymous" />
+<grant permission="Zope.View" role="Anonymous" />
-<security:grantPermissionToRole permission="Zope.View"
- role="Manager" />
-<security:grantPermissionToRole permission="Zope.ManageContent"
- role="Manager" />
-<security:grantPermissionToRole permission="Zope.Security"
- role="Manager" />
-
-<security:grantPermissionToRole permission="Zope.ManageServices"
- role="Manager" />
-
-<security:grantPermissionToRole permission="Zope.ManageApplication"
- role="Manager" />
+<grant permission="Zope.View" role="Manager" />
+<grant permission="Zope.ManageContent" role="Manager" />
+<grant permission="Zope.Security" role="Manager" />
+<grant permission="Zope.ManageServices" role="Manager" />
+<grant permission="Zope.ManageApplication" role="Manager" />
<include file="products.zcml" />