RE: [Zope-dev] Re: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-26 Thread Brian Lloyd

 TJM That did it!  But...  :) I ended up having to re-create all
 TJM my ZSQL methods, which was funny because they all worked in
 TJM the beta 1 but not in beta 2.  I kept getting len() of
 TJM unsized object errors.  Anyway, re-creating them all from
 TJM scratch (ugh..)  solved that problem.
 
 So - any news on the re-creating all the sql methods bit?  I am about
 to start doing the same thing.  Any way to work around this?

You certainly shouldn't have to do that - AFAIK, TJ's was the 
only report of that behavior. There ARE other people reporting 
something about "len of unsized object" errors with their SQL 
methods after upgrading that I'm trying to get to the bottom of. 

Unfortunately, I haven't been able to reproduce that locally. I 
would really appreciate if some folks would:

  o !!backup your original Data.fs!! before trying out 2.2 beta 2

  o If you have any problems with the SQLMethods, if you can send 
me your zipped object db (and info on what products need to 
be installed to reproduce your environment) that would help a 
lot. (send a copy of the back up Data.fs)

It would be great if someone can send me one where the SQL stuff 
is based on Gadfly or MySQL connections if possible...


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




[Zope-dev] RE: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-25 Thread Brian Lloyd

  I think that you have hit it on the head - we're trying *hard* to 
  make Zope harder to fool :^) Try adding the following to your 
  class statement, for example:
  
  class MyClass:
  
__allow_access_to_unprotected_subobjects__=1
 
 Just a question: Is this documented somewhere.. I've seen some more
 of these things here and wonder if there's some explanation 
 what exactly
 has changed in 2.2 and which constants can be used to control these
 things..

I plan to publish a guide for Product authors Monday that captures 
the essence of what has changed about the security policy and 
what product objects need to do to play nicely within it.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




[Zope-dev] Re: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-23 Thread T.J. Mannos

That did it!  But...  :)

I ended up having to re-create all my ZSQL methods, which was funny because
they all worked in the beta 1 but not in beta 2.  I kept getting len() of
unsized object errors.  Anyway, re-creating them all from scratch (ugh..)
solved that problem.

BUT, the BIG problem I'm having is still with the external method in
courseList.py.  I'll attach the file here.  It returns a list that can be
traversed with the dtml-in tag.  I'm still getting Unauthorized errors
when trying to access properties of the objects this function returns.  For
instance, when I run this function on a query sorted by 'term', the first
object in the list contains a property called 'open-term'.  When I try to
access this property within a dtml-in tag, even as Superuser, it gives me
an Unauthorized error.  I tried everything, even giving anonymous users all
privileges to that external method.  Nothing worked.  Here's my traceback:

Unauthorized
Sorry, a Zope error occurred.
Traceback (innermost last):
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: list_courses)
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: list_courses)
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/OFS/DTMLDocument.py,
line 168, in __call__
(Object: list_courses)
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py
, line 503, in __call__
(Object: list_courses)
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Let.py,
line 145, in render
(Object: page=id)
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py,
line 163, in __call__
(Object: course_list)
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py
, line 503, in __call__
(Object: course_list)
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Let.py,
line 145, in render
(Object: groupby="['term','type','category']"
query="db.listCourses(type=type,term=term,keyword=keyword,category=category,
inactive=inactive,show_new=PARENTS[0].id=='admin')")
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_In.py,
line 691, in renderwob
(Object: extern.courseList(_, groupby=groupby, query=query))
  File /usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py,
line 189, in validate
(Object: list_courses)
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/AccessControl/SecurityManager
.py, line 139, in validate
  File
/usr/Zope-2.2.0b2-solaris-2.6-sparc/lib/python/AccessControl/ZopeSecurityPol
icy.py, line 158, in validate
Unauthorized: open_term

Any ideas?  Now, it could just be my programming.  With the new 2.2 version
I may need to add security information to each object (which I don't know
how to do).  Right now I'm just starting with a blank class and adding a few
properties to it.  Zope may be looking at it and thinking, "What the heck is
this thing?"  The idea was to trick Zope into thinking it was a Z SQL query;
perhaps 2.2 isn't so easily fooled...?

At any rate, we're getting closer... :)

- T.J.

- Original Message -
From: Brian Lloyd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Brian Lloyd [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2000 9:25 AM
Subject: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...


 Hi all,

 Several folks have reported problems in beta 1 with SQLMethods
 having authentication problems when trying to call other SQL
 Methods. I'd like a few intrepid volunteers to try something
 for me to see if it fixes the problem. I'd like to make a 2.2
 beta 2 release tomorrow but I want to make sure this issue is
 resolved first.

 Make a backup of the file:

 lib/python/Shared/DC/ZRDB/DA.py

 in your current (beta 1) installation and replace it with the
 DA.py attached to this email, restart and let me know if the
 problem goes away.

 Thanks!

 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909
 Digital Creations  http://www.digicool.com






 courseList.py


[Zope-dev] RE: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-23 Thread Brian Lloyd

 BUT, the BIG problem I'm having is still with the external method in
 courseList.py. 

 snip
 
 Any ideas?  Now, it could just be my programming.  With the 
 new 2.2 version
 I may need to add security information to each object (which 
 I don't know
 how to do).  Right now I'm just starting with a blank class 
 and adding a few
 properties to it.  Zope may be looking at it and thinking, 
 "What the heck is
 this thing?"  The idea was to trick Zope into thinking it was 
 a Z SQL query;
 perhaps 2.2 isn't so easily fooled...?

I think that you have hit it on the head - we're trying *hard* to 
make Zope harder to fool :^) Try adding the following to your 
class statement, for example:

class MyClass:

  __allow_access_to_unprotected_subobjects__=1

  def __init(self, foo):
...

...You'll need to restart Zope for this to take effect.

Hope this helps!

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




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




[Zope-dev] Re: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-21 Thread Juan Carlos Coruña
Title: Re: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...






 Mensaje original 

El 21/06/00, 17:25:39, Brian Lloyd [EMAIL PROTECTED] escribi sobre
el tema [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...:


 Hi all,

 Several folks have reported problems in beta 1 with SQLMethods
 having authentication problems when trying to call other SQL
 Methods. I'd like a few intrepid volunteers to try something
 for me to see if it fixes the problem. I'd like to make a 2.2
 beta 2 release tomorrow but I want to make sure this issue is
 resolved first.

 Make a backup of the file:

 lib/python/Shared/DC/ZRDB/DA.py

 in your current (beta 1) installation and replace it with the
 DA.py attached to this email, restart and let me know if the
 problem goes away.

 Thanks!

 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909
 Digital Creations  http://www.digicool.com

It seems to work properly. But all the old ZSQL methods are converted
to folders and you must create the ZSQL methods another time. The
folders that appear aren't accesible and displays the error Resource
not found.





Re: [Zope-dev] Re: [Zope] Please test this Zope 2.2 beta 1 ZSQLMethods fix...

2000-06-21 Thread David C. Kankiewicz

Juan Carlos Coruña wrote:
 It seems to work properly. But all the old ZSQL methods are converted
 to folders and you must create the ZSQL methods another time. The
 folders that appear aren't accesible and displays the error "Resource
 not found".

I got all the ZSQL methods, in a CVS version of Zope (might be
different), back by exporting/re-importing the folder that holds them
and taking ownership :). I didn't look into why it happened...
Then again, I expect problems updating a CVS copy of Zope.

Regards,
David

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