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
148fd61b
Commit
148fd61b
authored
Jun 09, 2003
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some explanatory comments.
parent
85ea5884
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/python/AccessControl/ZopeSecurityPolicy.py
lib/python/AccessControl/ZopeSecurityPolicy.py
+10
-4
No files found.
lib/python/AccessControl/ZopeSecurityPolicy.py
View file @
148fd61b
...
...
@@ -13,8 +13,8 @@
__doc__
=
'''Define Zope
\
'
s default security policy
$Id: ZopeSecurityPolicy.py,v 1.2
1 2002/10/01 14:09:46 gvanrossum
Exp $'''
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
$Id: ZopeSecurityPolicy.py,v 1.2
2 2003/06/09 16:26:39 shane
Exp $'''
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
_use_python_impl
=
0
...
...
@@ -115,16 +115,22 @@ if _use_python_impl:
roles
=
getattr
(
container
,
'__roles__'
,
_noroles
)
if
roles
is
_noroles
:
# Try to acquire __roles__. If it can't be
# acquired, the value is unprotected. Deny access
# to acquired unprotected values even if they are
# in a simple container.
if
containerbase
is
container
:
# Container is not wrapped.
roles
=
_noroles
if
containerbase
is
not
accessedbase
:
return
0
if
containerbase
is
not
accessedbase
:
return
0
else
:
# Try to acquire roles
try
:
roles
=
container
.
aq_acquire
(
'__roles__'
)
except
AttributeError
:
roles
=
_noroles
if
containerbase
is
not
accessedbase
:
return
0
if
containerbase
is
not
accessedbase
:
return
0
# We need to make sure that we are allowed to
# get unprotected attributes from the container. We are
...
...
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