ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

Dieter Maurer dieter at handshake.de
Wed Jun 8 13:29:34 EDT 2005


John Barratt wrote at 2005-6-7 10:08 +1000:
> ...
> From a bit of digging through the code it seems there is a difference 
>comes about in the call on line 166 of AccessControl.User inside 
>_check_context :
>
>     return object.aq_inContextOf(context, 1)
>
>In Zope 2.8 it returns 0, in 2.76 it returns 1

Looks like an acquisition bug:

      obj.aq_inContextOf(context, 1) is recursively defined by:

	  True, if "obj.aq_base == context.aq_base"
	  or "container(obj) is not None"
	  and "container(obj).aq_inContextOf(context, 1)"

	  where "container(obj)" is "aq_parent(aq_inner(obj))"
	  which is the container containing "obj".

which is equivalent to (resolving the recursing):

      obj.aq_inContextOf(context, 1)
      iff for some (hierarchie) ancestor "a" of obj,
      "a.aq_base == context.aq_base".

Given this definition, you can check which implementation
is wrong and file a bug report.

-- 
Dieter


More information about the Zope-Dev mailing list