Commit 8e99ee34 authored by 's avatar

- use ApplicationDefaultPermissions directly from new location

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