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
26af3f79
Commit
26af3f79
authored
Jul 05, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged 'hasRole' -> 'allowed' fixup from branch
parent
7b3f18f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/python/AccessControl/ZopeSecurityPolicy.py
lib/python/AccessControl/ZopeSecurityPolicy.py
+5
-5
No files found.
lib/python/AccessControl/ZopeSecurityPolicy.py
View file @
26af3f79
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Define Zope
\
'
s default security policy
$Id: ZopeSecurityPolicy.py,v 1.
6 2000/06/29 14:08:07 shane
Exp $'''
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
$Id: ZopeSecurityPolicy.py,v 1.
7 2000/07/05 13:51:21 brian
Exp $'''
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
import
SimpleObjectPolicies
_noroles
=
[]
...
...
@@ -163,7 +163,7 @@ class ZopeSecurityPolicy:
if
roles
is
_noroles
:
return
1
# We are going to need a security-aware object to pass
# to
hasRole
. We'll use the container.
# to
allowed()
. We'll use the container.
value
=
container
# Short-circuit tests if we can:
...
...
@@ -176,7 +176,7 @@ class ZopeSecurityPolicy:
# If the executable had an owner, can it execute?
owner
=
eo
.
getOwner
()
if
(
owner
is
not
None
)
and
not
owner
.
hasRole
(
value
,
roles
):
if
(
owner
is
not
None
)
and
not
owner
.
allowed
(
value
,
roles
):
# We don't want someone to acquire if they can't
# get an unacquired!
if
accessedbase
is
containerbase
:
...
...
@@ -201,7 +201,7 @@ class ZopeSecurityPolicy:
try
:
if
context
.
user
.
hasRole
(
value
,
roles
):
return
1
if
context
.
user
.
allowed
(
value
,
roles
):
return
1
except
AttributeError
:
pass
# We don't want someone to acquire if they can't get an unacquired!
...
...
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