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
c4d05afc
Commit
c4d05afc
authored
Jan 10, 2001
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check to make sure container isn't request_container.
parent
c3e87c39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+7
-4
No files found.
lib/python/AccessControl/User.py
View file @
c4d05afc
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.12
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.12
9
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
import
os
...
@@ -649,7 +649,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -649,7 +649,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# default to accessed and container as v.aq_parent
# default to accessed and container as v.aq_parent
a
=
c
=
request
[
'PARENTS'
][
0
]
a
=
c
=
request
[
'PARENTS'
][
0
]
# try to find actual container
# try to find actual container
if
hasattr
(
v
,
'aq_
parent
'
):
if
hasattr
(
v
,
'aq_
inner
'
):
# this is not a method, we needn't treat it specially
# this is not a method, we needn't treat it specially
c
=
v
.
aq_inner
.
aq_parent
c
=
v
.
aq_inner
.
aq_parent
elif
hasattr
(
v
,
'im_self'
):
elif
hasattr
(
v
,
'im_self'
):
...
@@ -657,10 +657,13 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -657,10 +657,13 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
try
:
c
=
v
.
im_self
.
aq_inner
.
aq_parent
try
:
c
=
v
.
im_self
.
aq_inner
.
aq_parent
except
:
pass
except
:
pass
request_container
=
getattr
(
request
[
'PARENTS'
][
-
1
],
'aq_parent'
,
[])
request_container
=
getattr
(
request
[
'PARENTS'
][
-
1
],
'aq_parent'
,
[])
# if pub's aq_parent or container is the request container, it
# means pub was accessed from the root
if
a
is
request_container
:
if
a
is
request_container
:
# if pub's aq_parent is the request container, it
# means pub was accessed from the root
a
=
request
[
'PARENTS'
][
-
1
]
a
=
request
[
'PARENTS'
][
-
1
]
if
c
is
request_container
:
c
=
request
[
'PARENTS'
][
-
1
]
return
a
,
c
,
n
,
v
return
a
,
c
,
n
,
v
def
_isTop
(
self
):
def
_isTop
(
self
):
...
...
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