example instances: put all common stuff in loops package
This commit is contained in:
parent
98f023195b
commit
0e180bb229
13 changed files with 84 additions and 224 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@ var/
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
.settings
|
.settings
|
||||||
|
adminuser.zcml
|
||||||
|
|
14
inst/bluebream/adminuser.zcml.in
Normal file
14
inst/bluebream/adminuser.zcml.in
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
|
|
||||||
|
<principal
|
||||||
|
id="zope.manager"
|
||||||
|
title="Manager"
|
||||||
|
login="admin"
|
||||||
|
password="admin"
|
||||||
|
password_manager="Plain Text" />
|
||||||
|
|
||||||
|
<grant
|
||||||
|
role="zope.Manager"
|
||||||
|
principal="zope.manager" />
|
||||||
|
|
||||||
|
</configure>
|
|
@ -1,23 +1,13 @@
|
||||||
<configure
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
|
||||||
xmlns:browser="http://namespaces.zope.org/browser"
|
|
||||||
i18n_domain="bluebream">
|
|
||||||
|
|
||||||
<include file="../bluebream.zcml" />
|
<include package="loops" file="bluebream.zcml" />
|
||||||
|
|
||||||
<include package="zope.app.zcmlfiles" />
|
<include package="loops" file="securitypolicy.zcml" />
|
||||||
<include package="zope.app.i18n" />
|
|
||||||
<include package="zope.app.intid" />
|
|
||||||
<include package="zope.app.renderer" />
|
|
||||||
<include package="zope.app.session" />
|
|
||||||
<include package="zope.sendmail" file="meta.zcml" />
|
|
||||||
|
|
||||||
<include package="main" file="securitypolicy.zcml" />
|
<include file="adminuser.zcml" />
|
||||||
|
|
||||||
<browser:defaultView
|
<includeOverrides package="loops" file="overrides.zcml" />
|
||||||
for="zope.container.interfaces.IContainer"
|
|
||||||
name="index.html" />
|
|
||||||
|
|
||||||
<includeOverrides package="main" file="overrides.zcml" />
|
<includeOverrides file="overrides.zcml" />
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
<configure
|
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
|
||||||
i18n_domain="main">
|
|
||||||
|
|
||||||
<!-- This file contains sample security policy definition -->
|
|
||||||
|
|
||||||
<securityPolicy
|
|
||||||
component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
|
|
||||||
|
|
||||||
<unauthenticatedPrincipal
|
|
||||||
id="zope.anybody"
|
|
||||||
title="Unauthenticated User" />
|
|
||||||
|
|
||||||
<unauthenticatedGroup
|
|
||||||
id="zope.Anybody"
|
|
||||||
title="Unauthenticated Users" />
|
|
||||||
|
|
||||||
<authenticatedGroup
|
|
||||||
id="zope.Authenticated"
|
|
||||||
title="Authenticated Users" />
|
|
||||||
|
|
||||||
<everybodyGroup
|
|
||||||
id="zope.Everybody"
|
|
||||||
title="All Users" />
|
|
||||||
|
|
||||||
<role id="zope.Anonymous" title="Everybody"
|
|
||||||
description="All users have this role implicitly" />
|
|
||||||
<grant permission="zope.View" role="zope.Anonymous" />
|
|
||||||
|
|
||||||
<role id="zope.Manager" title="Site Manager" />
|
|
||||||
<grantAll role="zope.Manager" />
|
|
||||||
|
|
||||||
<role id="zope.Member" title="Site Member" />
|
|
||||||
<role id="zope.ContentManager" title="Content Manager" />
|
|
||||||
|
|
||||||
<grant role="zope.Member" permission="zope.View" />
|
|
||||||
<grant role="zope.ContentManager" permission="zope.ManageContent" />
|
|
||||||
<grant role="zope.ContentManager" permission="zope.View" />
|
|
||||||
|
|
||||||
<principal
|
|
||||||
id="zope.manager"
|
|
||||||
title="Manager"
|
|
||||||
login="admin"
|
|
||||||
password="admin"
|
|
||||||
password_manager="Plain Text" />
|
|
||||||
|
|
||||||
<grant
|
|
||||||
role="zope.Manager"
|
|
||||||
principal="zope.manager" />
|
|
||||||
|
|
||||||
</configure>
|
|
14
inst/loops/adminuser.zcml.in
Normal file
14
inst/loops/adminuser.zcml.in
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
|
|
||||||
|
<principal
|
||||||
|
id="zope.manager"
|
||||||
|
title="Manager"
|
||||||
|
login="admin"
|
||||||
|
password="admin"
|
||||||
|
password_manager="Plain Text" />
|
||||||
|
|
||||||
|
<grant
|
||||||
|
role="zope.Manager"
|
||||||
|
principal="zope.manager" />
|
||||||
|
|
||||||
|
</configure>
|
|
@ -1,22 +1,10 @@
|
||||||
<configure
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
|
||||||
xmlns:browser="http://namespaces.zope.org/browser"
|
|
||||||
i18n_domain="main">
|
|
||||||
|
|
||||||
<include file="../bluebream.zcml" />
|
<include package="loops" file="bluebream.zcml" />
|
||||||
|
|
||||||
<include package="zope.app.zcmlfiles" />
|
<include package="loops" file="securitypolicy.zcml" />
|
||||||
<include package="zope.app.i18n" />
|
|
||||||
<include package="zope.app.intid" />
|
|
||||||
<include package="zope.app.renderer" />
|
|
||||||
<include package="zope.app.session" />
|
|
||||||
<include package="zope.sendmail" file="meta.zcml" />
|
|
||||||
|
|
||||||
<include package="main" file="securitypolicy.zcml" />
|
<include file="adminuser.zcml" />
|
||||||
|
|
||||||
<browser:defaultView
|
|
||||||
for="zope.container.interfaces.IContainer"
|
|
||||||
name="index.html" />
|
|
||||||
|
|
||||||
<include package="cybertools" />
|
<include package="cybertools" />
|
||||||
<include package="cybertools.ajax.dojo" />
|
<include package="cybertools.ajax.dojo" />
|
||||||
|
@ -42,6 +30,7 @@
|
||||||
<include package="cyberapps.knowledge" />-->
|
<include package="cyberapps.knowledge" />-->
|
||||||
|
|
||||||
<!-- Override registrations -->
|
<!-- Override registrations -->
|
||||||
<includeOverrides package="main" file="overrides.zcml" />
|
<includeOverrides package="loops" file="overrides.zcml" />
|
||||||
|
<includeOverrides file="overrides.zcml" />
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
<html
|
|
||||||
i18n:domain="zope">
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h3 i18n:translate="">
|
|
||||||
The page that you are trying to access is not available
|
|
||||||
</h3>
|
|
||||||
<br/>
|
|
||||||
<b i18n:translate="">Please note the following:</b>
|
|
||||||
<br/>
|
|
||||||
<ol>
|
|
||||||
<li i18n:translate=""> You might have misspelled the url </li>
|
|
||||||
<li i18n:translate="">
|
|
||||||
You might be trying to access a non-existing page
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,48 +1,4 @@
|
||||||
<configure
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
|
||||||
xmlns:browser="http://namespaces.zope.org/browser">
|
|
||||||
|
|
||||||
<!-- ZCML declarations to override the default definitions -->
|
|
||||||
|
|
||||||
<browser:defaultSkin name="Loops" />
|
|
||||||
|
|
||||||
<browser:containerViews
|
|
||||||
for="zope.app.folder.interfaces.IFolder"
|
|
||||||
contents="zope.ManageContent"
|
|
||||||
index="zope.ManageContent"
|
|
||||||
add="zope.ManageContent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<browser:page
|
|
||||||
name="singleBranchTree.xml"
|
|
||||||
for="zope.interface.interface.Interface"
|
|
||||||
permission="zope.ManageContent"
|
|
||||||
class="zope.app.rotterdam.xmlobject.XmlObjectView"
|
|
||||||
attribute="singleBranchTree"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<browser:pages
|
|
||||||
for="zope.container.interfaces.IReadContainer"
|
|
||||||
permission="zope.ManageContent"
|
|
||||||
class="zope.app.rotterdam.xmlobject.ReadContainerXmlObjectView">
|
|
||||||
<browser:page
|
|
||||||
name="children.xml"
|
|
||||||
attribute="children"
|
|
||||||
/>
|
|
||||||
<browser:page
|
|
||||||
name="singleBranchTree.xml"
|
|
||||||
attribute="singleBranchTree"
|
|
||||||
/>
|
|
||||||
</browser:pages>
|
|
||||||
|
|
||||||
<browser:page
|
|
||||||
for="zope.publisher.interfaces.INotFound"
|
|
||||||
name="index.html"
|
|
||||||
permission="zope.Public"
|
|
||||||
template="notfound.pt"
|
|
||||||
class="zope.app.exception.browser.notfound.NotFound"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!--<include package="cco.member" />-->
|
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
<configure
|
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
|
||||||
i18n_domain="main">
|
|
||||||
|
|
||||||
<!-- This file contains sample security policy definition -->
|
|
||||||
|
|
||||||
<securityPolicy
|
|
||||||
component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
|
|
||||||
|
|
||||||
<unauthenticatedPrincipal
|
|
||||||
id="zope.anybody"
|
|
||||||
title="Unauthenticated User" />
|
|
||||||
|
|
||||||
<unauthenticatedGroup
|
|
||||||
id="zope.Anybody"
|
|
||||||
title="Unauthenticated Users" />
|
|
||||||
|
|
||||||
<authenticatedGroup
|
|
||||||
id="zope.Authenticated"
|
|
||||||
title="Authenticated Users" />
|
|
||||||
|
|
||||||
<everybodyGroup
|
|
||||||
id="zope.Everybody"
|
|
||||||
title="All Users" />
|
|
||||||
|
|
||||||
<role id="zope.Anonymous" title="Everybody"
|
|
||||||
description="All users have this role implicitly" />
|
|
||||||
<grant permission="zope.View" role="zope.Anonymous" />
|
|
||||||
|
|
||||||
<role id="zope.Manager" title="Site Manager" />
|
|
||||||
<grantAll role="zope.Manager" />
|
|
||||||
|
|
||||||
<role id="zope.Member" title="Site Member" />
|
|
||||||
<role id="zope.ContentManager" title="Content Manager" />
|
|
||||||
|
|
||||||
<grant role="zope.Member" permission="zope.View" />
|
|
||||||
<grant role="zope.ContentManager" permission="zope.ManageContent" />
|
|
||||||
<grant role="zope.ContentManager" permission="zope.View" />
|
|
||||||
<grant role="zope.ContentManager" permission="loops.AssignAsParent" />
|
|
||||||
|
|
||||||
<principal
|
|
||||||
id="zope.manager"
|
|
||||||
title="Manager"
|
|
||||||
login="admin"
|
|
||||||
password="admin"
|
|
||||||
password_manager="Plain Text" />
|
|
||||||
|
|
||||||
<grant
|
|
||||||
role="zope.Manager"
|
|
||||||
principal="zope.manager" />
|
|
||||||
|
|
||||||
</configure>
|
|
|
@ -1,4 +1,6 @@
|
||||||
<configure xmlns="http://namespaces.zope.org/zope">
|
<configure
|
||||||
|
xmlns="http://namespaces.zope.org/zope"
|
||||||
|
xmlns:browser="http://namespaces.zope.org/browser">
|
||||||
|
|
||||||
<include package="zope.component" file="meta.zcml" />
|
<include package="zope.component" file="meta.zcml" />
|
||||||
<include package="zope.security" file="meta.zcml" />
|
<include package="zope.security" file="meta.zcml" />
|
||||||
|
@ -52,13 +54,16 @@
|
||||||
<include package="zope.catalog" />
|
<include package="zope.catalog" />
|
||||||
<include package="zope.dublincore.browser" />
|
<include package="zope.dublincore.browser" />
|
||||||
|
|
||||||
<!-- enable the apidoc -->
|
<include package="zope.app.zcmlfiles" />
|
||||||
<!-- enable this when apidoc works
|
<include package="zope.app.i18n" />
|
||||||
<include zcml:condition="have devmode"
|
<include package="zope.app.intid" />
|
||||||
package="zope.app.apidoc" file="meta.zcml" />
|
<include package="zope.app.renderer" />
|
||||||
<include zcml:condition="have devmode"
|
<include package="zope.app.session" />
|
||||||
package="zope.app.apidoc" />
|
<include package="zope.sendmail" file="meta.zcml" />
|
||||||
-->
|
|
||||||
|
<browser:defaultView
|
||||||
|
for="zope.container.interfaces.IContainer"
|
||||||
|
name="index.html" />
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
|
3
loops/overrides.zcml
Normal file
3
loops/overrides.zcml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<configure xmlns="http://namespaces.zope.org/zope">
|
||||||
|
|
||||||
|
</configure>
|
|
@ -1,31 +1,40 @@
|
||||||
<!-- copy this file to the etc subdirectory of your Zope instance -->
|
|
||||||
|
|
||||||
<!-- security policy settings -->
|
|
||||||
|
|
||||||
<configure
|
<configure
|
||||||
xmlns="http://namespaces.zope.org/zope"
|
xmlns="http://namespaces.zope.org/zope"
|
||||||
i18n_domain="zope">
|
i18n_domain="main">
|
||||||
|
|
||||||
<include package="zope.app.securitypolicy" />
|
<!-- This file contains sample security policy definition -->
|
||||||
|
|
||||||
<securityPolicy
|
<securityPolicy
|
||||||
component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
|
component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
|
||||||
|
|
||||||
|
<unauthenticatedPrincipal
|
||||||
|
id="zope.anybody"
|
||||||
|
title="Unauthenticated User" />
|
||||||
|
|
||||||
|
<unauthenticatedGroup
|
||||||
|
id="zope.Anybody"
|
||||||
|
title="Unauthenticated Users" />
|
||||||
|
|
||||||
|
<authenticatedGroup
|
||||||
|
id="zope.Authenticated"
|
||||||
|
title="Authenticated Users" />
|
||||||
|
|
||||||
|
<everybodyGroup
|
||||||
|
id="zope.Everybody"
|
||||||
|
title="All Users" />
|
||||||
|
|
||||||
<role id="zope.Anonymous" title="Everybody"
|
<role id="zope.Anonymous" title="Everybody"
|
||||||
description="All users have this role implicitly" />
|
description="All users have this role implicitly" />
|
||||||
|
<grant permission="zope.View" role="zope.Anonymous" />
|
||||||
|
|
||||||
<role id="zope.Manager" title="Site Manager" />
|
<role id="zope.Manager" title="Site Manager" />
|
||||||
|
<grantAll role="zope.Manager" />
|
||||||
|
|
||||||
<role id="zope.Member" title="Site Member" />
|
<role id="zope.Member" title="Site Member" />
|
||||||
<role id="zope.ContentManager" title="Content Manager" />
|
<role id="zope.ContentManager" title="Content Manager" />
|
||||||
|
|
||||||
<grant role="zope.Anonymous" permission="zope.app.dublincore.view" />
|
|
||||||
<grant role="zope.Member" permission="zope.View" />
|
<grant role="zope.Member" permission="zope.View" />
|
||||||
|
|
||||||
<grant role="zope.ContentManager" permission="zope.ManageContent" />
|
<grant role="zope.ContentManager" permission="zope.ManageContent" />
|
||||||
<grant role="zope.ContentManager" permission="zope.View" />
|
<grant role="zope.ContentManager" permission="zope.View" />
|
||||||
|
|
||||||
<!-- loops-specific grant added in 2010-06 -->
|
|
||||||
<grant role="zope.ContentManager" permission="loops.AssignAsParent" />
|
|
||||||
|
|
||||||
<grantAll role="zope.Manager" />
|
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
|
Loading…
Add table
Reference in a new issue