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
9ffb99a2
Commit
9ffb99a2
authored
Jan 09, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added check for roles on final object's __call__ method.
parent
dca09b6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+9
-6
No files found.
lib/python/ZPublisher/Publish.py
View file @
9ffb99a2
...
...
@@ -362,7 +362,7 @@ Publishing a module using CGI
containing the module to be published) to the module name in the
cgi-bin directory.
$Id: Publish.py,v 1.7
2 1998/01/07 22:57:26
jim Exp $"""
$Id: Publish.py,v 1.7
3 1998/01/09 20:47:13
jim Exp $"""
#'
# Copyright
#
...
...
@@ -417,7 +417,7 @@ $Id: Publish.py,v 1.72 1998/01/07 22:57:26 jim Exp $"""
# See end of file for change log.
#
##########################################################################
__version__
=
'$Revision: 1.7
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
3
$'
[
11
:
-
2
]
def
main
():
...
...
@@ -780,10 +780,13 @@ class ModulePublisher:
steps
.
append
(
entry_name
)
# Check for method:
if
(
not
path
and
hasattr
(
object
,
method
)
and
entry_name
!=
method
):
response
.
setBase
(
URL
+
'/'
,
''
)
path
=
[
method
]
if
not
path
:
if
hasattr
(
object
,
method
)
and
entry_name
!=
method
:
response
.
setBase
(
URL
+
'/'
,
''
)
path
=
[
method
]
elif
(
hasattr
(
object
,
'__call__'
)
and
hasattr
(
object
.
__call__
,
'__roles__'
)):
roles
=
object
.
__call__
.
__roles__
if
entry_name
!=
method
and
method
!=
'index_html'
:
self
.
notFoundError
(
method
)
...
...
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