Commit 9620de65 authored by Jim Fulton's avatar Jim Fulton

Removed the security-manager "validateValue" api, and, thus, the DTML

equivalent of the same. This was necessitated by changes in the
security policy that requires access to source objects and attribute
names to check acces to objects obtained through attribute access.

New-style class dictionaries are immutable. Changed some class-update
code to use setattr rather thah class-dictionary modifications.
parent f0860413
......@@ -12,8 +12,8 @@
##############################################################################
'''Add security system support to Document Templates
$Id: DTML.py,v 1.10 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
$Id: DTML.py,v 1.11 2003/11/28 16:43:51 jim Exp $'''
__version__='$Revision: 1.11 $'[11:-2]
from DocumentTemplate import DT_Util
import SecurityManagement, string, math, whrandom, random
......@@ -86,14 +86,6 @@ class DTMLSecurityAPI:
.validate(inst, parent, name, value)
)
def SecurityValidateValue(md, value):
"""Convenience for common case of simple value validation.
"""
return (SecurityManagement
.getSecurityManager()
.validateValue(value)
)
def SecurityCheckPermission(md, permission, object):
"""Check whether the security context allows the given permission on
the given object.
......@@ -126,4 +118,6 @@ class DTMLSecurityAPI:
if r > 0: return r-1
return r
DT_Util.TemplateDict.__dict__.update(DTMLSecurityAPI.__dict__)
for name, v in DTMLSecurityAPI.__dict__.items():
if name[0] != '_':
setattr(DT_Util.TemplateDict, name, v)
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