Commit 6bd0a913 authored by 's avatar

*** empty log message ***

parent 7b168879
......@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
"$Id: DT_String.py,v 1.33 2000/03/09 19:22:33 brian Exp $"
"$Id: DT_String.py,v 1.34 2000/03/09 20:07:56 brian Exp $"
from string import split, strip
import regex, ts_regex
......@@ -465,9 +465,7 @@ class String:
if mapping:
push(mapping)
if hasattr(mapping,'AUTHENTICATED_USER'):
auth_user=mapping['AUTHENTICATED_USER']
verify_watermark(auth_user)
md.AUTHENTICATED_USER=auth_user
md.AUTHENTICATED_USER=mapping['AUTHENTICATED_USER']
md.validate=self.validate
if client is not None:
if type(client)==type(()):
......@@ -551,19 +549,3 @@ class File(FileMixin, String):
template is used the first time.
"""
def manage_edit(self,data): raise TypeError, 'cannot edit files'
# This bit performs watermark verification on the authenticated
# user object passed into the template. It is Zope-specific, and
# we don't want to break non-Zope apps so we check to see if we
# are running with Zope before installing the watermark function.
if hasattr(__builtins__, 'INSTANCE_HOME'):
from AccessControl.User import verify_watermark
else:
def verify_watermark(auth_user):
pass
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Method objects."""
__version__='$Revision: 1.38 $'[11:-2]
__version__='$Revision: 1.39 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower
......@@ -143,6 +143,11 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
kw['document_id'] =self.id
kw['document_title']=self.title
# Verify the authenticated user object.
auth_user=REQUEST.get('AUTHENTICATED_USER', None)
if auth_user is not None:
verify_watermark(auth_user)
if client is None:
# Called as subtemplate, so don't need error propigation!
r=apply(HTML.__call__, (self, client, REQUEST), kw)
......
......@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
__version__='$Revision: 1.18 $'[11:-2]
__version__='$Revision: 1.19 $'[11:-2]
from string import join, split, find, rfind, lower, upper
from urllib import quote
......@@ -464,6 +464,9 @@ class BaseRequest:
steps=join(steps[:-i],'/')
if user is not None:
# Try to set a watermark on the user object.
try: user.__marker__=_marker
except: pass
request['AUTHENTICATED_USER']=user
request['AUTHENTICATION_PATH']=steps
......
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