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
39bb110d
Commit
39bb110d
authored
Jun 29, 2000
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected the text of certain kinds of 'unauthorized' error messages.
parent
b1c0809b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
lib/python/AccessControl/ZopeSecurityPolicy.py
lib/python/AccessControl/ZopeSecurityPolicy.py
+11
-5
No files found.
lib/python/AccessControl/ZopeSecurityPolicy.py
View file @
39bb110d
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Define Zope
\
'
s default security policy
$Id: ZopeSecurityPolicy.py,v 1.
5 2000/06/01 13:46:15 jim
Exp $'''
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
$Id: ZopeSecurityPolicy.py,v 1.
6 2000/06/29 14:08:07 shane
Exp $'''
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
import
SimpleObjectPolicies
_noroles
=
[]
...
...
@@ -115,6 +115,7 @@ class ZopeSecurityPolicy:
############################################################
# Try to get roles
roles
=
getattr
(
value
,
'__roles__'
,
_noroles
)
if
roles
is
_noroles
:
############################################################
...
...
@@ -184,7 +185,7 @@ class ZopeSecurityPolicy:
%
cleanupName
(
name
,
value
))
return
0
# Proxy roles, which are alot safer now.
# Proxy roles, which are a
lot safer now.
proxy_roles
=
getattr
(
eo
,
'_proxy_roles'
,
None
)
if
proxy_roles
:
for
r
in
proxy_roles
:
...
...
@@ -221,6 +222,11 @@ def cleanupName(name, value):
# If name is not available, tries to get it from the value.
_name
=
name
if
_name
is
None
and
value
is
not
None
:
try
:
_name
=
value
.
__name__
except
:
pass
try
:
_name
=
value
.
id
except
:
try
:
_name
=
value
.
__name__
except
:
pass
if
callable
(
_name
):
try
:
_name
=
_name
()
except
:
pass
return
_name
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