Commit 8e99ee34 authored by 's avatar

- use ApplicationDefaultPermissions directly from new location

parent bdbfb2af
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
$Id$ $Id$
""" """
import string, Products, Globals import string, Products
name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an, name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an,
map(chr,range(256))) map(chr,range(256)))
...@@ -133,8 +132,8 @@ def registerPermissions(permissions, defaultDefault=('Manager',)): ...@@ -133,8 +132,8 @@ def registerPermissions(permissions, defaultDefault=('Manager',)):
Products.__ac_permissions__=( Products.__ac_permissions__=(
Products_permissions + ((perm, (), default),)) Products_permissions + ((perm, (), default),))
mangled=pname(perm) # get mangled permission name mangled=pname(perm) # get mangled permission name
if not hasattr(Globals.ApplicationDefaultPermissions, mangled): if not hasattr(ApplicationDefaultPermissions, mangled):
setattr(Globals.ApplicationDefaultPermissions, setattr(ApplicationDefaultPermissions,
mangled, default) mangled, default)
class ApplicationDefaultPermissions: class ApplicationDefaultPermissions:
......
...@@ -23,10 +23,11 @@ UNIQUE = 2 ...@@ -23,10 +23,11 @@ UNIQUE = 2
import Acquisition, ComputedAttribute, App.PersistentExtra, os import Acquisition, ComputedAttribute, App.PersistentExtra, os
import TreeDisplay import TreeDisplay
from AccessControl.Permission import ApplicationDefaultPermissions
from App.Common import package_home, attrget, Dictionary from App.Common import package_home, attrget, Dictionary
from App.config import getConfiguration as _getConfiguration from App.config import getConfiguration as _getConfiguration
from Persistence import Persistent, PersistentMapping from Persistence import Persistent, PersistentMapping
from App.class_init import default__class_init__, ApplicationDefaultPermissions from App.class_init import default__class_init__
# Nicer alias for class initializer. # Nicer alias for class initializer.
InitializeClass = default__class_init__ InitializeClass = default__class_init__
......
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