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
cc8e9a87
Commit
cc8e9a87
authored
Dec 11, 2001
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Work around absence of named Unauthorized exception in Zope 2.3x
parent
05c752d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
lib/python/Products/PageTemplates/Expressions.py
lib/python/Products/PageTemplates/Expressions.py
+6
-2
lib/python/Products/PageTemplates/ZopePageTemplate.py
lib/python/Products/PageTemplates/ZopePageTemplate.py
+6
-2
No files found.
lib/python/Products/PageTemplates/Expressions.py
View file @
cc8e9a87
...
...
@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths.
"""
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
7
$'
[
11
:
-
2
]
import
re
,
sys
from
TALES
import
Engine
,
CompilerError
,
_valid_name
,
NAME_RE
,
\
...
...
@@ -46,7 +46,11 @@ def installHandlers(engine):
if
sys
.
modules
.
has_key
(
'Zope'
):
import
AccessControl
from
AccessControl
import
getSecurityManager
,
Unauthorized
from
AccessControl
import
getSecurityManager
try
:
from
AccessControl
import
Unauthorized
except
ImportError
:
Unauthorized
=
"Unauthorized"
if
hasattr
(
AccessControl
,
'full_read_guard'
):
from
ZRPythonExpr
import
PythonExpr
,
_SecureModuleImporter
,
\
call_with_ns
...
...
lib/python/Products/PageTemplates/ZopePageTemplate.py
View file @
cc8e9a87
...
...
@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template.
"""
__version__
=
'$Revision: 1.2
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
9
$'
[
11
:
-
2
]
import
os
,
AccessControl
,
Acquisition
,
sys
from
Globals
import
DTMLFile
,
ImageFile
,
MessageDialog
,
package_home
...
...
@@ -25,7 +25,11 @@ from DateTime.DateTime import DateTime
from
string
import
join
,
strip
,
rstrip
,
split
,
replace
,
lower
from
Shared.DC.Scripts.Script
import
Script
,
BindingsUI
from
Shared.DC.Scripts.Signature
import
FuncCode
from
AccessControl
import
getSecurityManager
,
Unauthorized
from
AccessControl
import
getSecurityManager
try
:
from
AccessControl
import
Unauthorized
except
ImportError
:
Unauthorized
=
"Unauthorized"
from
OFS.History
import
Historical
,
html_diff
from
OFS.Cache
import
Cacheable
from
OFS.Traversable
import
Traversable
...
...
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