Re: [Zope] dtml-tree causing authorization errors

2001-01-24 Thread yves

I had read the Upgrade document, but hadn't followed the link to read the actual
Security How-To document. That definitely did the trick, thanks a lot for your
help!

 ..Yves

Quoting Dieter Maurer <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] writes:
>  > I've stumbled upon a strange problem with dtml-tree in version 2.2.5
> (the
>  > problems occurs in the same way in any of the 2.2.x version), but didn't
> exhibit
>  > itself in 2.1.6:
> You should read Brian's excellent "Upgrade to 2.2.x" document.
> It will explain you the changes in the protection policy
> and what class authors must do that the instances do not
> throw Unauthorized exceptions when accessed.
>
>
> Dieter
> 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] dtml-tree causing authorization errors

2001-01-23 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > I've stumbled upon a strange problem with dtml-tree in version 2.2.5 (the
 > problems occurs in the same way in any of the 2.2.x version), but didn't exhibit
 > itself in 2.1.6:
You should read Brian's excellent "Upgrade to 2.2.x" document.
It will explain you the changes in the protection policy
and what class authors must do that the instances do not
throw Unauthorized exceptions when accessed.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] dtml-tree causing authorization errors

2001-01-22 Thread yves

I've stumbled upon a strange problem with dtml-tree in version 2.2.5 (the
problems occurs in the same way in any of the 2.2.x version), but didn't exhibit
itself in 2.1.6:

Here's some (very) crude code to generate a tree object:

-
class Tree:
def __init__(self, val='top'):
self.name = val
self.tpId = val

def tpValues(self):
tlist = []

for i in range(8):
tlist.append(Tree('me: %s' % i))

return tlist

def build():
return Tree()
--

Now if I attach this to an "External Method" called "mytree" which references
the function "build()", and I write the following DTML:

-

  

-

In version 2.1.6, I obtain a tree, it's composed of 8 items and each expands
into 8 more, etc...

If I do the same thing in version 2.2.5, I get an authentication failure... even
though I'm logged on as superuser or an admin user... I've tried this on a fresh
install to ensure nothing gets in the way. The error I get is:


Zope Error

  Zope has encountered an error while publishing this resource. 

  Unauthorized

  Sorry, a Zope error occurred.

  Traceback (innermost last):
File /home/zope/Zope-2.2.5-src/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /home/zope/Zope-2.2.5-src/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /home/zope/Zope-2.2.5-src/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /home/zope/Zope-2.2.5-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
  (Object: toto)
File /home/zope/Zope-2.2.5-src/lib/python/ZPublisher/Publish.py, line 112,
in call_object
  (Object: toto)
File /home/zope/Zope-2.2.5-src/lib/python/OFS/DTMLMethod.py, line 172, in
__call__
  (Object: toto)
File /home/zope/Zope-2.2.5-src/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
  (Object: toto)
File /home/zope/Zope-2.2.5-src/lib/python/TreeDisplay/TreeTag.py, line 154,
in render
  (Object: glu)
File /home/zope/Zope-2.2.5-src/lib/python/TreeDisplay/TreeTag.py, line 260,
in tpRender
File /home/zope/Zope-2.2.5-src/lib/python/TreeDisplay/TreeTag.py, line 514,
in tpRenderTABLE
  (Info: (['top', []], {'id': 'tpId', 'childless_decoration': '', 'name':
'glu', 'branches': 'tpValues', 'url': 'tpURL', '': 'glu'}, (['top', []],),
(['top', []],)))
File /home/zope/Zope-2.2.5-src/lib/python/TreeDisplay/TreeTag.py, line 431,
in tpRenderTABLE
File /home/zope/Zope-2.2.5-src/lib/python/OFS/DTMLMethod.py, line 194, in
validate
  (Object: toto)
File /home/zope/Zope-2.2.5-src/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
File
/home/zope/Zope-2.2.5-src/lib/python/AccessControl/ZopeSecurityPolicy.py, line
159, in validate
  Unauthorized: name


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )