[Zope-Checkins] CVS: Zope3 - zope.zcml:1.1.2.12
Jim Fulton
jim@zope.com
Thu, 3 Jan 2002 14:31:27 -0500
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv18308
Modified Files:
Tag: Zope-3x-branch
zope.zcml
Log Message:
Added directives for defining (most of) the directives used.
=== Zope3/zope.zcml 1.1.2.11 => 1.1.2.12 ===
>
+<!-- Standard configuration directives -->
+
+ <!-- Zope.App.ZMI -->
+ <directives namespace="http://namespaces.zope.org/zmi">
+ <directive name="provideClass"
+ attributes="name, permission, title, description"
+ handler="Zope.App.ZMI.provideClass.provideClassDir" />
+ <directive name="tabs" attributes="for"
+ handler="Zope.App.ZMI.TabsDirective.">
+ <subdirective name="tab" attributes="label, action" />
+ </directive>
+ <directive name="icon" attributes="for, file"
+ handler="Zope.App.ZMI.IconDirective." />
+ </directives>
+
+ <!-- Zope.App.Security -->
+ <directives namespace="http://namespaces.zope.org/security">
+ <directive name="definePermission"
+ attributes="permission, title, description"
+ handler="Zope.App.Security.metaConfigure.definePermission" />
+ <directive name="defineRole"
+ attributes="role, title, description"
+ handler="Zope.App.Security.metaConfigure.defineRole" />
+ <directive name="protectClass"
+ attributes="name, permission, interface, method, methods"
+ handler="Zope.App.Security.protectClass">
+ <subdirective name="protect"
+ attributes="permission, interface, method, methods" />
+ <subdirective name="instances" attributes="permission" />
+ </directive>
+ <directive name="publicClass" attributes="name, interface, method, methods"
+ handler="Zope.App.Security.publicClass" />
+ <directive name="defaultPolicy" attributes="name"
+ handler="Zope.App.Security.metaConfigure.defaultPolicy" />
+ <directive name="principal" attributes="principal, title, description"
+ handler="Zope.App.Security.metaConfigure.principal" />
+ <directive name="defaultPrincipal"
+ attributes="principal, title, description"
+ handler="Zope.App.Security.metaConfigure.defaultPrincipal" />
+ <directive name="grantPermissionToRole" attributes="permission, role"
+ handler="Zope.App.Security.metaConfigure.grantPermissionToRole" />
+ <directive
+ name="grantPermissionToPrincipal"
+ attributes="permission, principal"
+ handler="Zope.App.Security.metaConfigure.grantPermissionToPrincipal" />
+ <directive name="assignRoleToPrincipal" attributes="role, principal"
+ handler="Zope.App.Security.metaConfigure.assignRoleToPrincipal" />
+ </directives>
+
+ <!-- Zope.ComponentArchitecture -->
+ <directives namespace="http://namespaces.zope.org/zope">
+ <directive name="adapter" attributes="component, provides, for"
+ handler="Zope.ComponentArchitecture.metaConfigure.adapter" />
+ <directive name="utility" attributes="component, provides"
+ handler="Zope.ComponentArchitecture.metaConfigure.utility" />
+ <directive name="view" attributes="component, type, name, for"
+ handler="Zope.ComponentArchitecture.metaConfigure.view" />
+ <directive name="defaultView" attributes="component, type, name, for"
+ handler="Zope.ComponentArchitecture.metaConfigure.defaultView" />
+ <directive name="serviceType" attributes="name, interface"
+ handler="Zope.ComponentArchitecture.metaConfigure.serviceType" />
+ <directive name="service" attributes="name, component"
+ handler="Zope.ComponentArchitecture.metaConfigure.service" />
+ </directives>
+
+ <!-- Zope.Publisher.Browser -->
+ <directives namespace="http://namespaces.zope.org/browser">
+ <directive name="view" attributes="component, name, for"
+ handler="Zope.Publisher.Browser.metaConfigure.view" />
+ <directive name="defaultView" attributes="component, name, for"
+ handler="Zope.Publisher.Browser.metaConfigure.defaultView" />
+ </directives>
+
+<!-- Standard services -->
+
+ <serviceType name="RoleService"
+ interface="Zope.App.Security.IRoleService" />
+ <service name="RoleService"
+ component="Zope.App.Security.RoleRegistry.roleRegistry" />
+
+ <serviceType name="PermissionService"
+ interface="Zope.App.Security.IPermissionService" />
+ <service name="PermissionService"
+ component="Zope.App.Security.PermissionRegistry.permissionRegistry" />
+
+ <serviceType name="AuthenticationService"
+ interface="Zope.App.Security.IAuthenticationService" />
+ <service name="AuthenticationService"
+ component="Zope.App.Security.PrincipalRegistry.principalRegistry" />
+
+<!-- Other stuff that still needs to get organizaed. -->
+
<adapter component="Zope.App.Traversing.Traverser"
provides="Zope.App.Traversing.ITraverser"
/>
@@ -15,6 +107,12 @@
<adapter component="Zope.App.Traversing.DefaultTraversable"
provides="Zope.App.Traversing.ITraversable" />
+<security:defaultPolicy
+ name="Zope.App.Security.ZopeSecurityPolicy.zopeSecurityPolicy" />
+
+<security:definePermission permission="Zope.View" title="View" />
+<security:definePermission permission="Zope.Security"
+ title="Change security settings" />
<security:definePermission permission="Zope.AddFolders" title="Add folders" />
<zmi:provideClass name="Zope.App.OFS.Folder"
@@ -29,6 +127,9 @@
for="Zope.App.OFS.IContainer"
component="Zope.App.OFS.ContainerTraverser.ContainerTraverser" />
+<security:protectClass name="Zope.App.OFS.FolderContents"
+ permission="Zope.View" methods="index" />
+
<browser:view name="contents"
for="Zope.App.OFS.Folder.IFolder"
component="Zope.App.OFS.FolderContents" />
@@ -41,6 +142,12 @@
for="Zope.App.OFS.RootFolder.IRootFolder"
component="Zope.App.OFS.FolderContents" /-->
+<security:protectClass name="Zope.App.OFS.FolderAdder"
+ permission="Zope.AddFolders" methods="index, confirmed, action" />
+
+<security:protectClass name="Zope.App.OFS.Folder"
+ permission="Zope.View" />
+
<browser:view name="adder"
for="Zope.App.OFS.Folder.IFolder"
component="Zope.App.OFS.FolderAdder" />
@@ -52,5 +159,28 @@
<adapter component="Zope.App.Security.BasicAuthAdapter"
provides="Zope.App.Security.ILoginPassword"
for="Zope.Publisher.HTTP.IHTTPCredentials" />
+
+
+<!-- Role-Permission management view -->
+
+<security:protectClass name="Zope.App.Security.RolePermissionView"
+ permission="Zope.Security"
+ methods="index, roles, permissions, permissionRoles, action" />
+
+<security:protectClass
+ name="Zope.App.Security.RolePermissionView.PermissionRoles"
+ permission="Zope.Security"
+ methods="roles"
+ interface="Zope.App.Security.IPermission" />
+
+<browser:view name="RolePermissionsManagement"
+ for="Zope.App.Security.IAttributeRolePermissionManageable"
+ component="Zope.App.Security.RolePermissionView" />
+
+<adapter component="Zope.App.Security.AttributeRolePermissionManager"
+ for="Zope.App.Security.IAttributeRolePermissionManageable"
+ provides="Zope.App.Security.IRolePermissionManager"
+ />
+
</zopeConfigure>