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
ec335004
Commit
ec335004
authored
Jan 09, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor change
parent
aa27828c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
lib/python/Products/PythonScripts/PythonScript.py
lib/python/Products/PythonScripts/PythonScript.py
+17
-4
No files found.
lib/python/Products/PythonScripts/PythonScript.py
View file @
ec335004
...
...
@@ -89,7 +89,7 @@ This product provides support for Script objects containing restricted
Python code.
"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
sys
,
os
,
traceback
,
re
from
Globals
import
MessageDialog
,
HTMLFile
,
package_home
...
...
@@ -155,19 +155,27 @@ class PythonScript(Script, Historical, Cacheable):
(
'ZPythonScript_edit'
,
'PUT'
,
'manage_FTPput'
,
'write'
,
'ZPythonScript_setTitle'
,
'ZPythonScriptHTML_upload'
,
'ZPythonScriptHTML_uploadForm'
,
'manage_historyCopy'
,
'manage_beforeHistoryCopy'
,
'manage_afterHistoryCopy'
)),
'manage_beforeHistoryCopy'
,
'manage_afterHistoryCopy'
,
'ZPythonScriptHTML_editAction'
,)),
(
'Change proxy roles'
,
(
'manage_proxyForm'
,
'manage_proxy'
)),
(
'View'
,
(
'__call__'
,
''
)),
(
'View'
,
(
'__call__'
,
''
)),
)
security
=
AccessControl
.
ClassSecurityInfo
()
def
__init__
(
self
,
id
):
self
.
id
=
id
self
.
ZBindings_edit
(
defaultBindings
)
self
.
_makeFunction
(
1
)
security
.
declareProtected
(
'View management screens'
,
'ZPythonScriptHTML_editForm'
,
'manage_main'
,
'read'
,
'ZPythonScriptHTML_uploadForm'
,
'ZPythonScriptHTML_editAction'
,
'document_src'
)
ZPythonScriptHTML_editForm
=
HTMLFile
(
'pyScriptEdit'
,
_www
)
manage
=
manage_main
=
ZPythonScriptHTML_editForm
manage_proxyForm
=
HTMLFile
(
'pyScriptProxy'
,
_www
)
ZPythonScriptHTML_uploadForm
=
HTMLFile
(
'pyScriptUpload'
,
_www
)
ZScriptHTML_tryForm
=
HTMLFile
(
'scriptTry'
,
_www
)
def
ZPythonScriptHTML_editAction
(
self
,
REQUEST
,
title
,
params
,
body
):
...
...
@@ -181,6 +189,8 @@ class PythonScript(Script, Historical, Cacheable):
return
self
.
ZPythonScriptHTML_editForm
(
self
,
REQUEST
,
manage_tabs_message
=
message
)
security
.
declareProtected
(
'Change Python Scripts'
,
'ZPythonScript_setTitle'
,
'ZPythonScript_edit'
)
def
ZPythonScript_setTitle
(
self
,
title
):
title
=
str
(
title
)
if
self
.
title
!=
title
:
...
...
@@ -350,6 +360,9 @@ class PythonScript(Script, Historical, Cacheable):
'
because
you
do
not
have
proxy
roles
.
\
n
<
!
--%
s
,
%
s
-->
'
% (self.id, u, roles))
security.declareProtected('
Change
proxy
roles
',
'
manage_proxyForm
', '
manage_proxy
')
manage_proxyForm = HTMLFile('
pyScriptProxy
', _www)
def manage_proxy(self, roles=(), REQUEST=None):
"Change Proxy Roles"
self._validateProxy(roles)
...
...
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