Commit c12ebd20 authored by Tres Seaver's avatar Tres Seaver

Protect views of ZPT source with 'View Management Screens' permision.

Fixes LP #978980.
parent 3c92e1f6
...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/. ...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/.
2.12.27 (unreleased) 2.12.27 (unreleased)
-------------------- --------------------
- LP #978980: Protect views of ZPT source with 'View Management Screens'
permision.
2.12.26 (2012-10-31) 2.12.26 (2012-10-31)
-------------------- --------------------
......
...@@ -57,6 +57,8 @@ if os.environ.has_key('ZPT_PREFERRED_ENCODING'): ...@@ -57,6 +57,8 @@ if os.environ.has_key('ZPT_PREFERRED_ENCODING'):
class Src(Explicit): class Src(Explicit):
""" I am scary code """ """ I am scary code """
security = ClassSecurityInfo()
security.declareObjectProtected(view_management_screens)
PUT = document_src = Acquired PUT = document_src = Acquired
index_html = None index_html = None
...@@ -69,6 +71,8 @@ class Src(Explicit): ...@@ -69,6 +71,8 @@ class Src(Explicit):
" " " "
return self.document_src(REQUEST) return self.document_src(REQUEST)
InitializeClass(Src)
class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
Traversable, PropertyManager): Traversable, PropertyManager):
"Zope wrapper for Page Template using TAL, TALES, and METAL" "Zope wrapper for Page Template using TAL, TALES, and METAL"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment