Commit 4257dbfe authored by Hanno Schlichting's avatar Hanno Schlichting

Deal with circular import problems and do some real deprecation

parent d561f077
...@@ -165,10 +165,8 @@ Mail Host ...@@ -165,10 +165,8 @@ Mail Host
o Change configuration o Change configuration
To support the architecture, developers must derive an To support the architecture, developers must derive an
object from the AccessControl.RoleManager mixin class, object from the AccessControl.rolemanager.BaseRoleManager mixin class,
and define in their class an __ac_permissions__ attribute. and define in their class an __ac_permissions__ attribute.
This should be a tuple of tuples, where each tuple represents This should be a tuple of tuples, where each tuple represents
...@@ -191,8 +189,6 @@ Example: ...@@ -191,8 +189,6 @@ Example:
('Delete properties', ['manage_delProperties']), ('Delete properties', ['manage_delProperties']),
('Default permission', ['']), ('Default permission', ['']),
) )
The developer may also predefine useful types of access, by The developer may also predefine useful types of access, by
specifying an __ac_types__ attribute. This should be a tuple of specifying an __ac_types__ attribute. This should be a tuple of
...@@ -214,8 +210,6 @@ Example: ...@@ -214,8 +210,6 @@ Example:
) )
Developers may also provide pre-defined role names that are Developers may also provide pre-defined role names that are
not deletable via the interface by specifying an __ac_roles__ not deletable via the interface by specifying an __ac_roles__
attribute. This is probably not something we'll ever use under attribute. This is probably not something we'll ever use under
...@@ -224,29 +218,3 @@ the new architecture, but it's there if you need it. ...@@ -224,29 +218,3 @@ the new architecture, but it's there if you need it.
Example: Example:
__ac_roles__=('Manager', 'Anonymous') __ac_roles__=('Manager', 'Anonymous')
This diff is collapsed.
...@@ -35,18 +35,20 @@ from App.Management import Navigation ...@@ -35,18 +35,20 @@ from App.Management import Navigation
from App.Management import Tabs from App.Management import Tabs
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from App.Dialogs import MessageDialog from App.Dialogs import MessageDialog
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
import AuthEncoding from AccessControl import AuthEncoding
import SpecialUsers from AccessControl import SpecialUsers
from interfaces import IStandardUserFolder from .interfaces import IStandardUserFolder
from requestmethod import requestmethod from .requestmethod import requestmethod
from PermissionRole import _what_not_even_god_should_do, rolesForPermissionOn from .PermissionRole import _what_not_even_god_should_do
from Role import RoleManager, DEFAULTMAXLISTUSERS from .PermissionRole import rolesForPermissionOn
from SecurityManagement import getSecurityManager from .rolemanager import DEFAULTMAXLISTUSERS
from SecurityManagement import newSecurityManager from .SecurityManagement import getSecurityManager
from SecurityManagement import noSecurityManager from .SecurityManagement import newSecurityManager
from ZopeSecurityPolicy import _noroles from .SecurityManagement import noSecurityManager
from .ZopeSecurityPolicy import _noroles
_marker=[] _marker=[]
......
This diff is collapsed.
...@@ -5,7 +5,7 @@ class TestRoleManager(unittest.TestCase): ...@@ -5,7 +5,7 @@ class TestRoleManager(unittest.TestCase):
def test_interfaces(self): def test_interfaces(self):
from AccessControl.interfaces import IRoleManager from AccessControl.interfaces import IRoleManager
from AccessControl.Role import BaseRoleManager from AccessControl.rolemanager import BaseRoleManager
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IRoleManager, BaseRoleManager) verifyClass(IRoleManager, BaseRoleManager)
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
......
...@@ -16,7 +16,6 @@ from urllib import quote ...@@ -16,7 +16,6 @@ from urllib import quote
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.Role import RoleManager
from Acquisition import Implicit from Acquisition import Implicit
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from App.special_dtml import HTML from App.special_dtml import HTML
...@@ -33,6 +32,7 @@ from DocumentTemplate.security import RestrictedDTML ...@@ -33,6 +32,7 @@ from DocumentTemplate.security import RestrictedDTML
from OFS.Cache import Cacheable from OFS.Cache import Cacheable
from OFS.History import Historical from OFS.History import Historical
from OFS.History import html_diff from OFS.History import html_diff
from OFS.role import RoleManager
from OFS.SimpleItem import Item_w__name__ from OFS.SimpleItem import Item_w__name__
from OFS.ZDOM import ElementWithTitle from OFS.ZDOM import ElementWithTitle
from webdav.Lockable import ResourceLockedError from webdav.Lockable import ResourceLockedError
......
...@@ -20,7 +20,6 @@ $Id$ ...@@ -20,7 +20,6 @@ $Id$
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import add_page_templates from AccessControl.Permissions import add_page_templates
from AccessControl.Permissions import add_user_folders from AccessControl.Permissions import add_user_folders
from AccessControl.Role import RoleManager
from AccessControl.SecurityManagement import getSecurityManager from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.unauthorized import Unauthorized from AccessControl.unauthorized import Unauthorized
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
...@@ -31,6 +30,7 @@ from OFS.FindSupport import FindSupport ...@@ -31,6 +30,7 @@ from OFS.FindSupport import FindSupport
from OFS.interfaces import IFolder from OFS.interfaces import IFolder
from OFS.ObjectManager import ObjectManager from OFS.ObjectManager import ObjectManager
from OFS.PropertyManager import PropertyManager from OFS.PropertyManager import PropertyManager
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
......
...@@ -25,7 +25,6 @@ from AccessControl.Permissions import view_management_screens ...@@ -25,7 +25,6 @@ from AccessControl.Permissions import view_management_screens
from AccessControl.Permissions import view as View from AccessControl.Permissions import view as View
from AccessControl.Permissions import ftp_access from AccessControl.Permissions import ftp_access
from AccessControl.Permissions import delete_objects from AccessControl.Permissions import delete_objects
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
...@@ -44,6 +43,7 @@ from zope.interface import implements ...@@ -44,6 +43,7 @@ from zope.interface import implements
from OFS.Cache import Cacheable from OFS.Cache import Cacheable
from OFS.PropertyManager import PropertyManager from OFS.PropertyManager import PropertyManager
from OFS.role import RoleManager
from OFS.SimpleItem import Item_w__name__ from OFS.SimpleItem import Item_w__name__
from zope.event import notify from zope.event import notify
......
...@@ -30,7 +30,6 @@ from AccessControl.SecurityInfo import ClassSecurityInfo ...@@ -30,7 +30,6 @@ from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.Owned import Owned from AccessControl.Owned import Owned
from AccessControl.Permissions import view as View from AccessControl.Permissions import view as View
from AccessControl.Role import RoleManager
from AccessControl.unauthorized import Unauthorized from AccessControl.unauthorized import Unauthorized
from AccessControl.ZopeSecurityPolicy import getRoles from AccessControl.ZopeSecurityPolicy import getRoles
from Acquisition import Acquired from Acquisition import Acquired
...@@ -58,6 +57,7 @@ from OFS.interfaces import IItem ...@@ -58,6 +57,7 @@ from OFS.interfaces import IItem
from OFS.interfaces import IItemWithName from OFS.interfaces import IItemWithName
from OFS.interfaces import ISimpleItem from OFS.interfaces import ISimpleItem
from OFS.CopySupport import CopySource from OFS.CopySupport import CopySource
from OFS.role import RoleManager
from OFS.Traversable import Traversable from OFS.Traversable import Traversable
from OFS.ZDOM import Element from OFS.ZDOM import Element
......
...@@ -19,8 +19,8 @@ from App.special_dtml import DTMLFile ...@@ -19,8 +19,8 @@ from App.special_dtml import DTMLFile
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Role import BaseRoleManager from AccessControl.rolemanager import BaseRoleManager
from AccessControl.Role import reqattr from AccessControl.rolemanager import reqattr
from AccessControl.Permission import Permission from AccessControl.Permission import Permission
from AccessControl.Permissions import change_permissions from AccessControl.Permissions import change_permissions
from AccessControl.requestmethod import requestmethod from AccessControl.requestmethod import requestmethod
......
...@@ -26,7 +26,6 @@ from AccessControl.class_init import InitializeClass ...@@ -26,7 +26,6 @@ from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import change_external_methods from AccessControl.Permissions import change_external_methods
from AccessControl.Permissions import view_management_screens from AccessControl.Permissions import view_management_screens
from AccessControl.Permissions import view as View from AccessControl.Permissions import view as View
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Acquired from Acquisition import Acquired
from Acquisition import Explicit from Acquisition import Explicit
...@@ -36,6 +35,7 @@ from App.Extensions import getPath ...@@ -36,6 +35,7 @@ from App.Extensions import getPath
from App.Extensions import FuncCode from App.Extensions import FuncCode
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from App.special_dtml import HTML from App.special_dtml import HTML
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from OFS.SimpleItem import pretty_tb from OFS.SimpleItem import pretty_tb
from Persistence import Persistent from Persistence import Persistent
......
...@@ -40,11 +40,11 @@ from AccessControl.class_init import InitializeClass ...@@ -40,11 +40,11 @@ from AccessControl.class_init import InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.Permissions import change_configuration, view from AccessControl.Permissions import change_configuration, view
from AccessControl.Permissions import use_mailhost_services from AccessControl.Permissions import use_mailhost_services
from AccessControl.Role import RoleManager
from Acquisition import Implicit from Acquisition import Implicit
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from Persistence import Persistent from Persistence import Persistent
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from zope.interface import implements from zope.interface import implements
......
...@@ -24,7 +24,6 @@ from urlparse import urlunparse ...@@ -24,7 +24,6 @@ from urlparse import urlunparse
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Owned import Owned from AccessControl.Owned import Owned
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
from Acquisition import aq_parent from Acquisition import aq_parent
...@@ -33,6 +32,7 @@ from App.Management import Tabs ...@@ -33,6 +32,7 @@ from App.Management import Tabs
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from Persistence import Persistent from Persistence import Persistent
from persistent import TimeStamp from persistent import TimeStamp
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from ZPublisher.BeforeTraverse import registerBeforeTraverse from ZPublisher.BeforeTraverse import registerBeforeTraverse
from ZPublisher.BeforeTraverse import unregisterBeforeTraverse from ZPublisher.BeforeTraverse import unregisterBeforeTraverse
......
...@@ -16,11 +16,11 @@ import sys ...@@ -16,11 +16,11 @@ import sys
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Owned import Owned from AccessControl.Owned import Owned
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from App.Management import Tabs from App.Management import Tabs
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
from ZPublisher.BeforeTraverse import registerBeforeTraverse from ZPublisher.BeforeTraverse import registerBeforeTraverse
......
...@@ -21,12 +21,12 @@ import os ...@@ -21,12 +21,12 @@ import os
import re import re
import string import string
from AccessControl.Role import RoleManager
from Acquisition import Implicit from Acquisition import Implicit
from App.Common import package_home from App.Common import package_home
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from DocumentTemplate import File from DocumentTemplate import File
from DocumentTemplate import HTML from DocumentTemplate import HTML
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
from zExceptions import Redirect from zExceptions import Redirect
......
...@@ -26,13 +26,13 @@ from AccessControl.Permissions import view_management_screens ...@@ -26,13 +26,13 @@ from AccessControl.Permissions import view_management_screens
from AccessControl.Permissions import change_database_connections from AccessControl.Permissions import change_database_connections
from AccessControl.Permissions import test_database_connections from AccessControl.Permissions import test_database_connections
from AccessControl.Permissions import open_close_database_connection from AccessControl.Permissions import open_close_database_connection
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
from App.Dialogs import MessageDialog from App.Dialogs import MessageDialog
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from DocumentTemplate import HTML from DocumentTemplate import HTML
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
from zExceptions import BadRequest from zExceptions import BadRequest
......
...@@ -23,7 +23,6 @@ from AccessControl.class_init import InitializeClass ...@@ -23,7 +23,6 @@ from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import change_database_methods from AccessControl.Permissions import change_database_methods
from AccessControl.Permissions import use_database_methods from AccessControl.Permissions import use_database_methods
from AccessControl.Permissions import view_management_screens from AccessControl.Permissions import view_management_screens
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager from AccessControl.SecurityManagement import getSecurityManager
from Acquisition import Implicit from Acquisition import Implicit
...@@ -35,6 +34,7 @@ from DocumentTemplate.security import RestrictedDTML ...@@ -35,6 +34,7 @@ from DocumentTemplate.security import RestrictedDTML
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from ExtensionClass import Base from ExtensionClass import Base
from BTrees.OOBTree import OOBucket as Bucket from BTrees.OOBTree import OOBucket as Bucket
from OFS.role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
from webdav.Resource import Resource from webdav.Resource import Resource
......
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