[Zope-Checkins] CVS: Zope/lib/python/OFS - DTMLMethod.py:1.79.4.1 PropertyManager.py:1.46.4.2 SimpleItem.py:1.102.4.3 Traversable.py:1.15.4.2

Chris McDonough chrism@zope.com
Sat, 28 Sep 2002 21:41:03 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv16902/lib/python/OFS

Modified Files:
      Tag: chrism-install-branch
	DTMLMethod.py PropertyManager.py SimpleItem.py Traversable.py 
Log Message:
Merge chrism-install-branch with head.  Apologies for the spew.


=== Zope/lib/python/OFS/DTMLMethod.py 1.79 => 1.79.4.1 ===
--- Zope/lib/python/OFS/DTMLMethod.py:1.79	Wed Aug 14 17:42:56 2002
+++ Zope/lib/python/OFS/DTMLMethod.py	Sat Sep 28 21:40:32 2002
@@ -368,14 +368,14 @@
         headers.append(header)
         spos = m.end() + 1
         while spos < len(html) and html[spos] in ' \t':
-            eol = find(html, '\r\n', spos)
+            eol = html.find('\r\n', spos)
             if eol <> -1:
                 eolen = 2
             else:
-                eol = find(html, '\n', spos)
+                eol = html.find( '\n', spos)
                 if eol < 0: return html
                 eolen = 1
-            header.append(strip(html[spos:eol]))
+            header.append(html[spos:eol].strip())
             spos = eol + eolen
     if RESPONSE is not None:
         for header in headers:


=== Zope/lib/python/OFS/PropertyManager.py 1.46.4.1 => 1.46.4.2 ===


=== Zope/lib/python/OFS/SimpleItem.py 1.102.4.2 => 1.102.4.3 ===


=== Zope/lib/python/OFS/Traversable.py 1.15.4.1 => 1.15.4.2 ===
--- Zope/lib/python/OFS/Traversable.py:1.15.4.1	Mon Sep 16 02:00:50 2002
+++ Zope/lib/python/OFS/Traversable.py	Sat Sep 28 21:40:32 2002
@@ -19,6 +19,7 @@
 from Acquisition import Acquired, aq_inner, aq_parent, aq_base
 from AccessControl import getSecurityManager
 from AccessControl import Unauthorized
+from AccessControl.ZopeGuards import guarded_getattr
 from urllib import quote
 
 _marker=[]
@@ -134,21 +135,11 @@
                             raise Unauthorized, name
 
                 else:
-                    o=get(object, name, M)
-                    if o is not M:
-                        if restricted:
-                            # waaaa
-                            if hasattr(aq_base(object), name):
-                                # value wasn't acquired
-                                if not securityManager.validate(
-                                    object, object, name, o):
-                                    raise Unauthorized, name
-                            else:
-                                if not securityManager.validate(
-                                    object, N, name, o):
-                                    raise Unauthorized, name
-
+                    if restricted:
+                        o = guarded_getattr(object, name, M)
                     else:
+                        o = get(object, name, M)
+                    if o is M:
                         o=object[name]
                         if (restricted and not securityManager.validate(
                             object, object, N, o)):