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
58021892
Commit
58021892
authored
Mar 12, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the workaround since aq_inContextOf() is now fixed.
parent
c5ba0b5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+2
-16
No files found.
lib/python/AccessControl/User.py
View file @
58021892
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.14
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.14
4
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
...
...
@@ -248,11 +248,7 @@ class BasicUser(Implicit):
# Fail the access attempt. Otherwise
# this would be a security hole.
return
None
# -----------------------------------------------------
# FIXME: this is a workaround for broken aq_inContextOf
# -----------------------------------------------------
# if not object.aq_inContextOf(ucontext, 1):
if
not
isInContext
(
ucontext
,
object
):
if
not
object
.
aq_inContextOf
(
ucontext
,
1
):
if
'Shared'
in
object_roles
:
# Damn, old role setting. Waaa
object_roles
=
self
.
_shared_roles
(
object
)
...
...
@@ -1068,14 +1064,4 @@ def reqattr(request, attr):
try
:
return
request
[
attr
]
except
:
return
None
from
Acquisition
import
aq_base
,
aq_inner
,
aq_parent
def
isInContext
(
fixed
,
variable
):
fixed
=
aq_base
(
fixed
)
while
variable
is
not
None
:
v
=
aq_base
(
variable
)
if
v
is
fixed
:
return
1
variable
=
aq_parent
(
aq_inner
(
variable
))
return
0
Super
=
UnrestrictedUser
# Note: use of the Super alias is deprecated.
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