[Zope] Zope 2.2.0a1 permission problems

Brian Lloyd Brian@digicool.com
Thu, 18 May 2000 20:21:52 -0400


> > >>I just installed release 2.2.0a1 on a glibc Linux box, but I keep
> > >>getting a permission problem when accessing a database query.
>
> ...
>
> > After beating on this over the last day or so trying to
> > understand what was happening at the Web interface level
> > (thinking that I must have just screwed up a permissions
> > setting somewhere), I finally looked at the code and
> > simply commented out line 602 in
> > 	
> /data/www/Zope/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_In.py
> > 
> > 	# raise ValidationError, index
> > 
> > Ta da!  It works...for now.  This little patch will get
> > me up and going.  I trust that someone will fix whatever
> > problem necessitated this in a future release and I
> > won't need this awful kludge, but it sure is nice to be
> > able to use it now.
> > 
> 
> Anyone know what the real fix is?

I don't _know_ yet, but I suspect :^) I think that something is
running afoul of the new security checking inside the __call__
method of SQLMethod objects. If someone wants to use the Zope
debugger (the debugger is your friend!) to sniff into this, 
that is where you should start. Under the debugger, set a 
breakpoint in the __call__ of the DA class in 
lib/python/Shared/DC/ZRDB/DA.py. Stepping through should point
out what object is failing authorization. If anyone is so 
inclined, Michel P. has a very good debugger how-to:

http://www.zope.org/Members/michel/HowTos/TheDebuggerIsYourFriend

...and let me know what you find out. I won't be around Friday,
but I was planning to put on the sherlock hat and work this out 
Monday - of course I hope someone beats me to it :^)



Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com