[Zope-Checkins] CVS: Zope3/doc/zcml/namespaces.zope.org/zope - defaultPrincipal.stx:1.1.2.1 grant.stx:1.1.2.1 permission.stx:1.1.2.1 principal.stx:1.1.2.1 role.stx:1.1.2.1 securityPolicy.stx:1.1.2.1
Steve Alexander
steve@cat-box.net
Sun, 9 Jun 2002 14:24:41 -0400
Update of /cvs-repository/Zope3/doc/zcml/namespaces.zope.org/zope
In directory cvs.zope.org:/tmp/cvs-serv29407/doc/zcml/namespaces.zope.org/zope
Added Files:
Tag: Zope-3x-branch
defaultPrincipal.stx grant.stx permission.stx principal.stx
role.stx securityPolicy.stx
Log Message:
made ZopeSecurityPolicy assert it implements ISecurityPolicy
started added zcml docs.
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/defaultPrincipal.stx ===
The defaultPrincipal directive
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/grant.stx ===
The grant directive
Overview
It is used to do the following:
* grant permissions to principals
* associate permissions with roles
* assign roles to principals
Ultimately, this is all to do with granting permissions, so the grant
directive is used for all of these.
Attributes
The grant directive has three possible attributes
* permission, a permission's id
* principal, a principal's id
* role, a role's id
However, only these combinations are valid
* permission - role
* permission - principal
* role - principal
Note that the permissions, principals and roles need to be defined
elsewhere using the permission, role and principal directives.
Examples
Here are some examples of using the grant directive::
<grant permission="Zope.View" principal="Bob" />
<grant role="Zope.Manager" principal="Bob" />
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/permission.stx ===
The permission directive
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/principal.stx ===
The principal directive
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/role.stx ===
The role directive
=== Added File Zope3/doc/zcml/namespaces.zope.org/zope/securityPolicy.stx ===
The securityPolicy directive
Overview
Sets the security policy that Zope will use.
XXX: Explain what this means.
Attributes
The securityPolicy directive takes these attributes
* component, the component that implements the security policy
* factory, a callable that returns a security policy
The security policy component should implement the interface
"Zope.Security.ISecurityPolicy."