Re: [Zope-dev] Looping through a folder's contents...

2000-08-21 Thread David Trudgett
At 2000-08-20 23:06 -0700, [EMAIL PROTECTED] wrote: I would like to loop through the contents of a folder, and the contents of the subfolders of that folder. I know I can do this to a singular level by doing something like: dtml-in "subfolder.objectValues('Folder')" dtml-var title /dtml-in

Re: [Zope-dev] Data.fs

2000-08-21 Thread Toby Dickenson
On Sat, 19 Aug 2000 14:17:51 -0400 (EDT), Chris McDonough [EMAIL PROTECTED] wrote: Surely this raises some data integrity issues if you copy in mid-transaction? Or does an incomplete transaction at the end of the db just get thrown out, and the design of the db assure that only the end of

[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton
+---[ [EMAIL PROTECTED] ]-- | I would like to loop through the contents of a folder, and the | contents of the subfolders of that folder. I know I can do this to a | singular level by doing something like: | | dtml-in "subfolder.objectValues('Folder')" | dtml-var title |

[Zope-dev] Looping through a folder's contents...

2000-08-21 Thread jiva
I would like to loop through the contents of a folder, and the contents of the subfolders of that folder. I know I can do this to a singular level by doing something like: dtml-in "subfolder.objectValues('Folder')" dtml-var title /dtml-in Should give me a list of the titles of all the

[Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Chris Withers
Hi, Just doing Squishdot for 2.2 when I noticed the following: The SquishSite class has a method called item_count() which is used on one of the management pages. It currently isn't protected by any permissions or __roles__ and yet it still works fine on the management screen concerned. I

[Zope-dev] acquired methods and permissions

2000-08-21 Thread Chris Withers
More questions from 2.2'ing Squishdot ;-) If a method is acquired by an object, does it use any permissions defined for that method in the object it's acquired from, or do you have to specify the permissions in the acquiring object as well? cheers, Chris

[Zope-dev] attribute protection question

2000-08-21 Thread Chris Withers
In the new security model is it just attributes that are methods that are protected or is it all attributes? For example, I have a lump of text in an Article class which is stored in self.body. Now, would I need body__roles__=None or somethign similar to be able to do: dtml-var body ? cheers,

Re: [Zope-dev] zpatterns: how to invalidate the attributecache?

2000-08-21 Thread Jephte CLAIN
"Phillip J. Eby" wrote: I don't see a need for a mass invalidation operation, just more documentation on these inner workings. :) or the lack of an attribute depencies mechanism :-) if attribute x depends on attribute y from another generic attribute provider, invalidation of y doesn't make y

Re: [Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Toby Dickenson
On Mon, 21 Aug 2000 12:15:24 +0100, Chris Withers [EMAIL PROTECTED] wrote: The SquishSite class has a method called item_count() which is used on one of the management pages. It currently isn't protected by any permissions or __roles__ and yet it still works fine on the management screen

Re: [Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Chris Withers
Toby Dickenson wrote: Firstly, I assume your management page is a dtml file on disk, not a dtml object stored in the ZODB. dtml files bypass *all* security checks. That's nice :( Secondly, all objects that inherit from OFS.Item.SimpleItem (that is, almost all high level objects) have the

[Zope-dev] Unauthorized head hurting :(

2000-08-21 Thread Chris Withers
Is there any way you can find out what, exactly (ie a traceback ;-) is causing an unauthorized error? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! **

RE: [Zope-dev] attribute protection question

2000-08-21 Thread Brian Lloyd
In the new security model is it just attributes that are methods that are protected or is it all attributes? All attributes - methods just happen to be the most common case. Now, would I need body__roles__=None or somethign similar to be able to do: dtml-var body Yes, or (better)

[Zope-dev] Squish

2000-08-21 Thread Chris Withers
...it was named appropriately ;-) Right, this would probably be easier if you have a background knowledge of Confera/Squishdot code, anyway... there's two classes, SquishSite and Posting. They don't inherit from each other, but postings are always contained in a SquishSite and eveything is

[Zope-dev] aq_inContextOf/can anyone explain this zmonitor log?

2000-08-21 Thread Bob Pepin
Hi, I just experienced some very weird behaviour from aq_inContextOf while I was trying to get Cut and Paste to work (I had to trace to the whole security stuff to do this, and read the C source for the acquisition stuff the figure out what aq_inContextOf does of course... thanks for having such

[Zope-dev] __ac_permissions__ question

2000-08-21 Thread Chris Withers
If I define the following in an Article class (which subclasses Posting): __ac_permissions__ = Posting.__ac_permissions__ + ( ('View', ['prev_item','next_item','showSummary','desc_items'], ('Anonymous', 'Manager')), ) and Posting.__ac_permissions__ also defines a 'View' permission, which

[Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Shane Hathaway
Chris Withers wrote: If I define the following in an Article class (which subclasses Posting): __ac_permissions__ = Posting.__ac_permissions__ + ( ('View', ['prev_item','next_item','showSummary','desc_items'], ('Anonymous', 'Manager')), ) You don't need to concatenate the permissions

Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Chris Withers
Shane Hathaway wrote: __ac_permissions__ = Posting.__ac_permissions__ + ( ('View', ['prev_item','next_item','showSummary','desc_items'], ('Anonymous', 'Manager')), ) You don't need to concatenate the permissions of the base classes. default__class_init__ will pick them up. Now that

[Zope-dev] intSet and the new security model

2000-08-21 Thread Chris Withers
Hi, Squishdot uses an intSet called 'thread' to store some information. Items in this intSet are used in several DTML methods, for example: A HREF="dtml-var site_url /dtml-var expr="thread[0]" /index_html#dtml-var id "Return to main thread/A Now, in Zope 2.2 this throws an unauthorized error

[Zope-dev] intSet and the new security model: solved with hack :(

2000-08-21 Thread Chris Withers
Chris Withers wrote: Squishdot uses an intSet called 'thread' to store some information. Items in this intSet are used in several DTML methods, for example: A HREF="dtml-var site_url /dtml-var expr="thread[0]" /index_html#dtml-var id "Return to main thread/A Now, in Zope 2.2 this throws

[Zope-dev] Re: intSet and the new security model: solved with hack :(

2000-08-21 Thread Chris Withers
Chris Withers wrote: Squishdot uses an intSet called 'thread' to store some information. Items in this intSet are used in several DTML methods, for example: A HREF="dtml-var site_url /dtml-var expr="thread[0]" /index_html#dtml-var id "Return to main thread/A Now, in Zope 2.2 this

Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Shane Hathaway
Chris Withers wrote: Okay, Posting has the following list of methods for the 'view' permission: ['date_posted','body_len','date_created','time_created','attachment','thread_path','index_html','showBody',

RE: [Zope-dev] attribute protection question

2000-08-21 Thread Brian Lloyd
Hmmm. Hence the problem with properties that meant OFS.Item.SimpleItem had to have __allow_access_to_unprotected_subobjects__=1? Can you not just assign roles to properties as they're created or am I missing something else? That's one way to do it - but it will require some thought to

[Zope-dev] Squishdot and Zope 2.2

2000-08-21 Thread Chris Withers
Shane Hathaway wrote: How do I do that? class Article: __ac_permissions__ = ( ('View', ('prev_item', 'next_item', 'showSummary', 'desc_items')), ) ... etc ... Globals.default__class_init__(Article) Okay, I've changed it to that now :-) BTW did getSubject() solve

[Zope-dev] Fighting with ZServer

2000-08-21 Thread Dieter Maurer
Since this afternoon, I am fighting with ZServer. Currently, it seems Zserver is winning I do not understand, what I see... At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 4.51 Sometimes, images are not shown by Netscape (broken image). No "simple" reload is able to change this,

[Zope-dev] ZServer logging bug (was: Fighting with ZServer)

2000-08-21 Thread Dieter Maurer
Dieter Maurer writes: Since this afternoon, I am fighting with ZServer. At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5 All images are always shown correctly. However, there is no log entry in "var/Z2.log" for about 50 % of the requests that are answered by

Re: [Zope-dev] LoginManager.

2000-08-21 Thread Bill Anderson
Terje Malmedal wrote: Can anybody please provide a simple example of a working usersource written in python? Look at the UserSource source for LoginManager and Membership. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password.

[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton
+---[ [EMAIL PROTECTED] ]-- | What would the "Recurse_Subfolder" method do? | | dtml-in "root.objectValues('Folder')" | dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title | dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)" | /dtml-in That *is*

[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread jiva
What would the "Recurse_Subfolder" method do? On Mon, Aug 21, 2000 at 04:12:05PM +1000, Andrew Kenneth Milton wrote: +---[ [EMAIL PROTECTED] ]-- | I would like to loop through the contents of a folder, and the | contents of the subfolders of that folder. I know I can