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
4b71ec52
Commit
4b71ec52
authored
Jul 06, 2008
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport fix for LP#245649.
parent
8406133b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
6 deletions
+19
-6
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/AccessControl/Permission.py
lib/python/AccessControl/Permission.py
+2
-1
lib/python/AccessControl/Role.py
lib/python/AccessControl/Role.py
+2
-1
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+2
-1
lib/python/Products/__init__.py
lib/python/Products/__init__.py
+6
-1
lib/python/ZClasses/Basic.py
lib/python/ZClasses/Basic.py
+4
-2
No files found.
doc/CHANGES.txt
View file @
4b71ec52
...
...
@@ -8,6 +8,9 @@ Zope Changes
Bugs fixed
- Launchpad #245649: the Products package is now a proper
"namespace package" under the rules specified by setuptools.
- Launchpad #239636: Ensure that HEAD requests lock an empty body
for NotFound errors.
...
...
lib/python/AccessControl/Permission.py
View file @
4b71ec52
...
...
@@ -129,8 +129,9 @@ def registerPermissions(permissions, defaultDefault=('Manager',)):
else
:
perm
,
methods
,
default
=
setting
_registeredPermissions
[
perm
]
=
1
Products_permissions
=
getattr
(
Products
,
'__ac_permissions__'
,
())
Products
.
__ac_permissions__
=
(
Products
.
__ac_permissions__
+
((
perm
,(),
default
),))
Products
_permissions
+
((
perm
,
(),
default
),))
mangled
=
pname
(
perm
)
# get mangled permission name
if
not
hasattr
(
Globals
.
ApplicationDefaultPermissions
,
mangled
):
setattr
(
Globals
.
ApplicationDefaultPermissions
,
...
...
lib/python/AccessControl/Role.py
View file @
4b71ec52
...
...
@@ -532,7 +532,8 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
def
possible_permissions
(
self
):
d
=
{}
for
p
in
Products
.
__ac_permissions__
:
Products_permissions
=
getattr
(
Products
,
'__ac_permissions__'
,
())
for
p
in
Products_permissions
:
d
[
p
[
0
]]
=
1
for
p
in
self
.
aq_acquire
(
'_getProductRegistryData'
)(
'ac_permissions'
):
d
[
p
[
0
]]
=
1
...
...
lib/python/OFS/ObjectManager.py
View file @
4b71ec52
...
...
@@ -236,7 +236,8 @@ class ObjectManager(
return
meta_types
def
_subobject_permissions
(
self
):
return
(
Products
.
__ac_permissions__
+
Products_permissions
=
getattr
(
Products
,
'__ac_permissions__'
,
())
return
(
Products_permissions
+
self
.
aq_acquire
(
'_getProductRegistryData'
)(
'ac_permissions'
)
)
...
...
lib/python/Products/__init__.py
View file @
4b71ec52
...
...
@@ -10,4 +10,9 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__ac_permissions__
=
()
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
lib/python/ZClasses/Basic.py
View file @
4b71ec52
...
...
@@ -189,9 +189,10 @@ class ZClassPermissionsSheet(OFS.PropertySheets.PropertySheet,
manage
=
Globals
.
DTMLFile
(
'dtml/classPermissions'
,
globals
())
def
possible_permissions
(
self
):
Products_permissions
=
getattr
(
Products
,
'__ac_permissions__'
,
())
r
=
map
(
lambda
p
:
p
[
0
],
Products
.
__ac_permissions__
+
Products
_permissions
+
self
.
aq_acquire
(
'_getProductRegistryData'
)(
'ac_permissions'
)
)
r
.
sort
()
...
...
@@ -199,9 +200,10 @@ class ZClassPermissionsSheet(OFS.PropertySheets.PropertySheet,
def
manage_edit
(
self
,
selected
=
[],
REQUEST
=
None
):
"Remove some permissions"
Products_permissions
=
getattr
(
Products
,
'__ac_permissions__'
,
())
r
=
[]
for
p
in
(
Products
.
__ac_permissions__
+
Products
_permissions
+
self
.
aq_acquire
(
'_getProductRegistryData'
)(
'ac_permissions'
)):
if
p
[
0
]
in
selected
:
r
.
append
(
p
)
...
...
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