example instances: put all common stuff in loops package

This commit is contained in:
Helmut Merz 2024-10-02 16:57:36 +02:00
parent 98f023195b
commit 0e180bb229
13 changed files with 84 additions and 224 deletions

1
.gitignore vendored
View file

@ -10,3 +10,4 @@ var/
*.sublime-project
*.sublime-workspace
.settings
adminuser.zcml

View 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>

View file

@ -1,23 +1,13 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="bluebream">
<configure xmlns="http://namespaces.zope.org/zope">
<include file="../bluebream.zcml" />
<include package="loops" file="bluebream.zcml" />
<include package="zope.app.zcmlfiles" />
<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="loops" file="securitypolicy.zcml" />
<include package="main" file="securitypolicy.zcml" />
<include file="adminuser.zcml" />
<browser:defaultView
for="zope.container.interfaces.IContainer"
name="index.html" />
<includeOverrides package="loops" file="overrides.zcml" />
<includeOverrides package="main" file="overrides.zcml" />
<includeOverrides file="overrides.zcml" />
</configure>

View file

@ -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>

View 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>

View file

@ -1,22 +1,10 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="main">
<configure xmlns="http://namespaces.zope.org/zope">
<include file="../bluebream.zcml" />
<include package="loops" file="bluebream.zcml" />
<include package="zope.app.zcmlfiles" />
<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="loops" file="securitypolicy.zcml" />
<include package="main" file="securitypolicy.zcml" />
<browser:defaultView
for="zope.container.interfaces.IContainer"
name="index.html" />
<include file="adminuser.zcml" />
<include package="cybertools" />
<include package="cybertools.ajax.dojo" />
@ -42,6 +30,7 @@
<include package="cyberapps.knowledge" />-->
<!-- Override registrations -->
<includeOverrides package="main" file="overrides.zcml" />
<includeOverrides package="loops" file="overrides.zcml" />
<includeOverrides file="overrides.zcml" />
</configure>

View file

@ -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>

View file

@ -1,48 +1,4 @@
<configure
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 xmlns="http://namespaces.zope.org/zope">
</configure>

View file

@ -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>

View file

@ -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.security" file="meta.zcml" />
@ -52,13 +54,16 @@
<include package="zope.catalog" />
<include package="zope.dublincore.browser" />
<!-- enable the apidoc -->
<!-- enable this when apidoc works
<include zcml:condition="have devmode"
package="zope.app.apidoc" file="meta.zcml" />
<include zcml:condition="have devmode"
package="zope.app.apidoc" />
-->
<include package="zope.app.zcmlfiles" />
<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" />
<browser:defaultView
for="zope.container.interfaces.IContainer"
name="index.html" />
</configure>

3
loops/overrides.zcml Normal file
View file

@ -0,0 +1,3 @@
<configure xmlns="http://namespaces.zope.org/zope">
</configure>

View file

@ -1,31 +1,40 @@
<!-- copy this file to the etc subdirectory of your Zope instance -->
<!-- security policy settings -->
<configure
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
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"
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.Anonymous" permission="zope.app.dublincore.view" />
<grant role="zope.Member" permission="zope.View" />
<grant role="zope.ContentManager" permission="zope.ManageContent" />
<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>