Commit 60c32442 authored by Hanno Schlichting's avatar Hanno Schlichting

Moved zope.security-style permission registrations from Products.Five into the...

Moved zope.security-style permission registrations from Products.Five into the AccessControl package.
parent a8675bd8
...@@ -11,6 +11,9 @@ Trunk (unreleased) ...@@ -11,6 +11,9 @@ Trunk (unreleased)
Restructuring Restructuring
+++++++++++++ +++++++++++++
- Moved zope.security-style permission registrations from Products.Five into
the AccessControl package.
- Moved ``Products/Five/publisher.zcml`` into the ZPublisher package. - Moved ``Products/Five/publisher.zcml`` into the ZPublisher package.
- Moved ``Products/Five/event.zcml`` into the OFS package. - Moved ``Products/Five/event.zcml`` into the OFS package.
......
...@@ -39,6 +39,7 @@ change_configuration='Change configuration' ...@@ -39,6 +39,7 @@ change_configuration='Change configuration'
change_page_templates='Change Page Templates' change_page_templates='Change Page Templates'
change_permissions='Change permissions' change_permissions='Change permissions'
change_proxy_roles='Change proxy roles' change_proxy_roles='Change proxy roles'
copy_or_move='Copy or Move'
create_class_instances='Create class instances' create_class_instances='Create class instances'
define_permissions='Define permissions' define_permissions='Define permissions'
delete_objects='Delete objects' delete_objects='Delete objects'
...@@ -63,7 +64,6 @@ use_mailhost_services='Use mailhost services' ...@@ -63,7 +64,6 @@ use_mailhost_services='Use mailhost services'
view='View' view='View'
view_history='View History' view_history='View History'
view_management_screens='View management screens' view_management_screens='View management screens'
copy_or_move='Copy or Move'
webdav_access='WebDAV access' webdav_access='WebDAV access'
webdav_lock_items='WebDAV Lock items' webdav_lock_items='WebDAV Lock items'
webdav_unlock_items='WebDAV Unlock items' webdav_unlock_items='WebDAV Unlock items'
<configure xmlns="http://namespaces.zope.org/zope">
<include file="permissions.zcml"/>
</configure>
<configure xmlns="http://namespaces.zope.org/zope"
i18n_domain="Zope2">
<permission
id="zope2.Public"
title="Public, everyone can access"
/>
<permission
id="zope2.Private"
title="Private, only accessible from trusted code"
/>
<permission
id="zope2.AccessContentsInformation"
title="Access contents information"
/>
<permission
id="zope2.ChangeImagesFiles"
title="Change Images and Files"
/>
<permission
id="zope2.ChangeConfig"
title="Change configuration"
/>
<permission
id="zope2.ChangePermissions"
title="Change permissions"
/>
<permission
id="zope2.CopyOrMove"
title="Copy or Move"
/>
<permission
id="zope2.DefinePermissions"
title="Define permissions"
/>
<permission
id="zope2.DeleteObjects"
title="Delete objects"
/>
<permission
id="zope2.FTPAccess"
title="FTP access"
/>
<permission
id="zope2.ImportExport"
title="Import/Export objects"
/>
<permission
id="zope2.ManageProperties"
title="Manage properties"
/>
<permission
id="zope2.ManageUsers"
title="Manage users"
/>
<permission
id="zope2.Undo"
title="Undo changes"
/>
<permission
id="zope2.View"
title="View"
/>
<permission
id="zope2.ViewHistory"
title="View History"
/>
<permission
id="zope2.ViewManagementScreens"
title="View management screens"
/>
<permission
id="zope2.WebDAVLock"
title="WebDAV Lock items"
/>
<permission
id="zope2.WebDAVUnlock"
title="WebDAV Unlock items"
/>
<permission
id="zope2.WebDAVAccess"
title="WebDAV access"
/>
</configure>
...@@ -112,10 +112,11 @@ def test_default_method_args_marshalling(): ...@@ -112,10 +112,11 @@ def test_default_method_args_marshalling():
First, we load the configuration file: First, we load the configuration file:
>>> import AccessControl
>>> import Products.Five.tests >>> import Products.Five.tests
>>> from Products.Five import zcml >>> from Products.Five import zcml
>>> zcml.load_config('meta.zcml', Products.Five) >>> zcml.load_config('meta.zcml', Products.Five)
>>> zcml.load_config("permissions.zcml", Products.Five) >>> zcml.load_config("permissions.zcml", AccessControl)
>>> zcml.load_config('directives.zcml', Products.Five.tests) >>> zcml.load_config('directives.zcml', Products.Five.tests)
Define a view, with a single attribute and the name of the view Define a view, with a single attribute and the name of the view
......
...@@ -23,10 +23,11 @@ def test_menu(): ...@@ -23,10 +23,11 @@ def test_menu():
Before we can start we need to set up a few things. For menu Before we can start we need to set up a few things. For menu
configuration, we have to start a new interaction: configuration, we have to start a new interaction:
>>> import AccessControl
>>> import Products.Five.browser.tests >>> import Products.Five.browser.tests
>>> from Products.Five import zcml >>> from Products.Five import zcml
>>> zcml.load_config("meta.zcml", Products.Five) >>> zcml.load_config("meta.zcml", Products.Five)
>>> zcml.load_config("permissions.zcml", Products.Five) >>> zcml.load_config("permissions.zcml", AccessControl)
>>> zcml.load_config('menu.zcml', package=Products.Five.browser.tests) >>> zcml.load_config('menu.zcml', package=Products.Five.browser.tests)
>>> from Products.Five.security import newInteraction >>> from Products.Five.security import newInteraction
......
...@@ -13,108 +13,7 @@ ...@@ -13,108 +13,7 @@
title="Manage Five local sites" title="Manage Five local sites"
/> />
<!-- Give common Zope2 and CMF permissions a permission ID <include package="AccessControl" file="permissions.zcml" />
The title of the permission is what Zope 2 knows it under -->
<permission
id="zope2.Public"
title="Public, everyone can access"
/>
<permission
id="zope2.Private"
title="Private, only accessible from trusted code"
/>
<permission
id="zope2.AccessContentsInformation"
title="Access contents information"
/>
<permission
id="zope2.ChangeImagesFiles"
title="Change Images and Files"
/>
<permission
id="zope2.ChangeConfig"
title="Change configuration"
/>
<permission
id="zope2.ChangePermissions"
title="Change permissions"
/>
<permission
id="zope2.CopyOrMove"
title="Copy or Move"
/>
<permission
id="zope2.DefinePermissions"
title="Define permissions"
/>
<permission
id="zope2.DeleteObjects"
title="Delete objects"
/>
<permission
id="zope2.FTPAccess"
title="FTP access"
/>
<permission
id="zope2.ImportExport"
title="Import/Export objects"
/>
<permission
id="zope2.ManageProperties"
title="Manage properties"
/>
<permission
id="zope2.ManageUsers"
title="Manage users"
/>
<permission
id="zope2.Undo"
title="Undo changes"
/>
<permission
id="zope2.View"
title="View"
/>
<permission
id="zope2.ViewHistory"
title="View History"
/>
<permission
id="zope2.ViewManagementScreens"
title="View management screens"
/>
<permission
id="zope2.WebDAVLock"
title="WebDAV Lock items"
/>
<permission
id="zope2.WebDAVUnlock"
title="WebDAV Unlock items"
/>
<permission
id="zope2.WebDAVAccess"
title="WebDAV access"
/>
<!-- CMF Core Permissions --> <!-- CMF Core Permissions -->
......
...@@ -22,11 +22,12 @@ def test_editview(): ...@@ -22,11 +22,12 @@ def test_editview():
>>> from zope.component.testing import setUp, tearDown >>> from zope.component.testing import setUp, tearDown
>>> setUp() >>> setUp()
>>> import AccessControl
>>> import Products.Five >>> import Products.Five
>>> import Products.Five.utilities >>> import Products.Five.utilities
>>> from Products.Five import zcml >>> from Products.Five import zcml
>>> zcml.load_config('meta.zcml', Products.Five) >>> zcml.load_config('meta.zcml', Products.Five)
>>> zcml.load_config('permissions.zcml', Products.Five) >>> zcml.load_config('permissions.zcml', AccessControl)
>>> zcml.load_config('configure.zcml', Products.Five.utilities) >>> zcml.load_config('configure.zcml', Products.Five.utilities)
>>> from Products.Five.utilities.browser.marker import EditView >>> from Products.Five.utilities.browser.marker import EditView
>>> from Products.Five.tests.testing.simplecontent import SimpleContent >>> from Products.Five.tests.testing.simplecontent import SimpleContent
......
...@@ -27,8 +27,9 @@ from Products.Five.tests.adapters import Adaptable ...@@ -27,8 +27,9 @@ from Products.Five.tests.adapters import Adaptable
def setupZCML(): def setupZCML():
import AccessControl
zcml.load_config('meta.zcml', Products.Five) zcml.load_config('meta.zcml', Products.Five)
zcml.load_config('permissions.zcml', Products.Five) zcml.load_config('permissions.zcml', AccessControl)
zcml.load_config('directives.zcml', Products.Five.tests) zcml.load_config('directives.zcml', Products.Five.tests)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment