Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
8e99ee34
Commit
8e99ee34
authored
Jan 03, 2009
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- use ApplicationDefaultPermissions directly from new location
parent
bdbfb2af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib/python/AccessControl/Permission.py
lib/python/AccessControl/Permission.py
+3
-4
lib/python/Globals/__init__.py
lib/python/Globals/__init__.py
+2
-1
No files found.
lib/python/AccessControl/Permission.py
View file @
8e99ee34
...
@@ -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
:
...
...
lib/python/Globals/__init__.py
View file @
8e99ee34
...
@@ -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__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment