Re: [Zope] Documentation and Books

2006-04-21 Thread Erik Billing


The Plone version which I was speaking about, at http://www.plope.com/Books/2_7Edition,
is version 2.7 and is as far as I've seen the same as v. 2.7 at zope.org,
except for the reader comments of course. The book may of course have bin
updated consciously but left the comments from 2002, for example in the "Extending
zope" chapter, intact. Anyway, it doesn't really matter, my point was just that
it doesn't look that good. 

/ErikOn 4/20/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
Erik Billing wrote at 2006-4-19 23:04 +0200:>Yes, the developers guide I've seen, and the Zope Book of course, they are>both pretty good I guess, but certainly the Zope book seams pretty outdated>if you ask me.
You must look at the 2.7 edition of the Zope book (online).--Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-21 Thread Erik Billing


Ah! Thanx! DocFinder will shore come very useful in time =)



Btw, what editor would you recommend for writing python
outside Zope. I've frequently used Eclipse with PyDev before, but it's a bit slow
and heavy. I've looked around a bit on the free editors without finding
anything I like so I'm thinking it might be worth trying a commercial editor. What
do you guys use? 

/ErikOn 4/20/06, Stefan H. Holek <[EMAIL PROTECTED]> wrote:
I recommend to install DocFinderTab. And there is something at http://api.plone.org/ for those who like such things ;-)StefanOn 18. Apr 2006, at 13:21, Erik Billing wrote:
> Is there any complete api reference avalible?--Anything that happens, happens.  --Douglas Adams
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Documentation and Books

2006-04-19 Thread Erik Billing


Ok, I found
the reference to ZopeWiki under Zope Exits on zope.org, stupid of me to not
look around properly before I start complaining. :P

/ErikOn 4/19/06, Erik Billing <[EMAIL PROTECTED]> wrote:
Yes, the
developers guide I've seen, and the Zope Book of course, they are both pretty good
I guess, but certainly the Zope book seams pretty outdated if you ask me. I
found several unanswered comments in the plone version of the book which were
from 2002, it does not that look good if you are a new user and think that you
are reading the main documentation of zope.  

Anyhow, the
ZopeWiki seams to be great, I'm surprised that I didn't find any link from zope.org!



Thanx you
all for your answers. I guess I will have a lot to dig into before I guy a book
anyway =)

/ErikOn 4/19/06, Dieter Maurer <
[EMAIL PROTECTED]> wrote:
Bakhtiar A Hamid wrote at 2006-4-19 13:54 +0800:>On 4/19/06, Erik Billing <[EMAIL PROTECTED]> wrote:
> ...>> By the way, I'm surprised how little zope documentation I've found on the
>> web. I'm missing a complete API reference for example. And is there a living>> Wiki available somewhere? If not, why not start one?>>>>

http://www.plope.com/Books/2_7Edition>and zopewiki,orgAnd the "Zope Developper Guide" (online).--Dieter___Zope maillist  -  

Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev
 )


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


Re: [Zope] Documentation and Books

2006-04-19 Thread Erik Billing
Yes, the
developers guide I've seen, and the Zope Book of course, they are both pretty good
I guess, but certainly the Zope book seams pretty outdated if you ask me. I
found several unanswered comments in the plone version of the book which were
from 2002, it does not that look good if you are a new user and think that you
are reading the main documentation of zope.  

Anyhow, the
ZopeWiki seams to be great, I'm surprised that I didn't find any link from zope.org!



Thanx you
all for your answers. I guess I will have a lot to dig into before I guy a book
anyway =)

/ErikOn 4/19/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
Bakhtiar A Hamid wrote at 2006-4-19 13:54 +0800:>On 4/19/06, Erik Billing <[EMAIL PROTECTED]> wrote:> ...>> By the way, I'm surprised how little zope documentation I've found on the
>> web. I'm missing a complete API reference for example. And is there a living>> Wiki available somewhere? If not, why not start one?>>>>
http://www.plope.com/Books/2_7Edition>and zopewiki,orgAnd the "Zope Developper Guide" (online).--Dieter___Zope maillist  -  
Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope**   No cross posts or HTML encoding!  **(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-19 Thread Erik Billing


This is
what they should put on the documentation page on zope.org instead of a link to
the zope book, thank your very much for telling me!/Erik

On 4/19/06, Sascha Welter <[EMAIL PROTECTED]> wrote:
(Tue, Apr 18, 2006 at 12:00:12PM -0400) [EMAIL PROTECTED] wrote/schrieb/egrapse:> From: "Erik Billing" <[EMAIL PROTECTED]
>> Thank you, that worked nicely. But I was unable to call the LazyFilter from> the DTML document, I figure I have to import the ZTUtils module first. Is> there a special DTML-tag to do import?
>> By the way? Is there some obvious documentation about the different modules> that I have missed? As I mentioned in an earlier letter I'm new to Zope and> I find it very hard to get an overview of all the different modules
If you are new to Zope you should drop DTML like a hot potatoe and startdoing your logic in python and your presentation in ZPT -- strictlyparted.Also don't bother too much with implementing stuff with TTW means
("through the web" - the stuff you do from the ZMI). Better start doingfilesystem python products. Read for examplehttp://zopewiki.org/ZopeStarter - including the link to the "new"
tutorial from upfrontsystems.The ZopeStarter page is a 5 minute read, but has good pointers to stuffthat will get you started in the right directioin.Regards,Sascha___
Zope maillist  -  Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev
 )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Documentation and Books

2006-04-18 Thread Erik Billing
I quite
recently began looking at Zope and now I'm looking for a good book on the
subject. I'm fairly familiar with both Python and webapp development in
general, so I'm looking for a book covering pretty much everything about Zope I
need to know, rather then an introduction. I've read a few reviews on Amazon
and Web Component Development with Zope
3 seams to be a good choice.  

Does anyone have another to recommend? 





By the way, I'm surprised how little zope documentation I've found on the
web. I'm missing a complete API reference for example. And is there a living Wiki
available somewhere? If not, why not start one? 

Any tips on good recourses are greatly appreciated. 

..Erik
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DELETE Objects

2006-04-18 Thread Erik Billing


Ok. If proxy
is the way to do it, then it is so, even thaw I still think it's a little backwords. But you have a good point Stefan, of course objects may be viewed as
an property of the parent container, and the permissions follows from that.  And of course it's not much of a problem to do
the security check inside the python script, the question was ment as to ask if this was the
right way, which you clearly answered :P 



Thank you all for your comments.
/ErikOn 4/18/06, Alexis Roda <
[EMAIL PROTECTED]> wrote:Erik Billing escribió:>> Ok. Thanx. But why is it like this? I imagine that deleting an object in
> a folder where I do not have permission to delete every object, or the> folder itself, is a quite common task. Using the manage_delObjects and a> proxy really feels like I'm fighting the zope security instead of
> getting support by it.Proxy roles are provided/supported by zope security machinery, where'sthe fight?> Or am I thinking wrong in the first place? What I really want to do is> letting users answer a question object and the answers should be stored
> somewhere. A user must later be able to change or remove his answer, but> of course not the answers of any other user. I place all answers objects> belonging to a certain question in one folder, and I have the previously
> mentioned situation.The only problem with proxy role (AFAICS) is users being able to deleteanswers from other users. In your current design the script with proxyrole could (should) check if the current user is allowed to delete an
answer (looking at some attribute). I don't see a big problem.> I know it is not that much of a problem to use a proxy, but if I can> change my design in some way so can avoid the proxy I imagine that would
> be better.Well, store all answers from a user in the same folder.Sl.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-18 Thread Erik Billing
Ok. I didn't find any epidoc on plone at a first googleing, but I have a closer look and post the link here if I find it. 

I solved some of the API doc problem by starting a local pydoc server (ex. pydoc -p 8079) which cover even the zope modules when I put them in the python path. But 
I'm
still somewhat surprised that there is no more complete documentation on Zope. I
will post my comments about this in a new thread since it no longer has
anything to do with permissions and stuff. 

Anyway, thank you very much for your help Dieter. Best regards /ErikOn 4/18/06, Dieter Maurer <[EMAIL PROTECTED]
> wrote:Erik Billing wrote at 2006-4-18 11:42 +0200:>Thank you, that worked nicely. But I was unable to call the LazyFilter from
>the DTML document, I figure I have to import the ZTUtils module first. Is>there a special DTML-tag to do import?No, you have to go through a Python Script.But, you can make it generic, something like a "filterUnauthorized"
script.> ...>Is there any complete api reference avalible?The Plone people have an "epidoc" documentation online (I do nothave the url at hand, you have to search for it).
Like any documentation generated automatically from the source(this is valid also for Java documentation), it is completebut contains more details than you might be interested in.--Dieter

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


Re: [Zope] DELETE Objects

2006-04-18 Thread Erik Billing




Ok. Thanx. But why is it like this? I imagine that deleting an
object in a folder where I do not have permission to delete every object, or
the folder itself, is a quite common task. Using the manage_delObjects and a
proxy really feels like I'm fighting the zope security instead of getting
support by it. 

Or am I thinking wrong in the first place? What I really
want to do is letting users answer a question object and the answers should be
stored somewhere. A user must later be able to change or remove his answer, but
of course not the answers of any other user. I place all answers objects
belonging to a certain question in one folder, and I have the previously
mentioned situation. 



I know it is not that much of a problem to use a proxy, but
if I can change my design in some way so can avoid the proxy I imagine that
would be better. 

/ErikOn 4/18/06, Andreas Jung <[EMAIL PROTECTED]> wrote:
--On 18. April 2006 14:15:48 +0200 Erik Billing <[EMAIL PROTECTED]> wrote:> I want to create a python script that deletes a specific file from a> folder. For now, the user who is calling the script does not have the
> Delete objects permission on the folder, only the file which he should be> able to delete. I have previously used the delObjects method on the> folder to remove the file, but this requires the Delete obejcts
> permission on the folder itself.folder.manage_delObjects()  is the only API method you should use.If your script needs additional permissions you must give the scriptthe proxy role Manager.
-aj--ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - GermanyWeb: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] DELETE Objects

2006-04-18 Thread Erik Billing




I want to create a python script that deletes a specific file from a folder. For now, the user who is calling the script does not have the Delete objects permission on the folder, only the file which he should be able to delete. I have previously used the delObjects method on the folder to remove the file, but this requires the Delete obejcts permission on the folder itself. I would like to do something like 
container[entry_id].DELETE() but the DELETE method requires 3 arguments, and I dont know what to give it? Or is it better to go in the delObjects on the container and use a proxy to solve the permission problems?
Best regards /Erik
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-18 Thread Erik Billing
Thank you, that worked nicely. But I was unable to call the
LazyFilter from the DTML document, I figure I have to import the ZTUtils module
first. Is there a special DTML-tag to do import? 

By the way? Is there some obvious documentation about the different
modules that I have missed? As I mentioned in an earlier letter I'm new to Zope
and I find it very hard to get an overview of all the different modules available.
It seams to me that the API Reference on the zope home page does not cover the
modules completely. For example, I found ZTUtils listed, but it only contains the
Batch class, not the LazyFilter or any of the other classes in the module. I
feel that this is the case with many of the modules.Is there any complete api reference avalible?Best regards /ErikOn 4/17/06, Dieter Maurer
 <[EMAIL PROTECTED]> wrote:Erik Billing wrote at 2006-4-16 18:55 +0200:
>...>Thanx, it worked fine when I allowed the unauthorized module, but I still>wonder if this is the way I *should* do it, is there no easier way that does>not incorporate an python script (or a similar clumsy dtml solution). It
>just feels a little overkill to write a specific script just to access the>files in a directory.You can use the "LazyFilter" from the "ZTUtils" package.In fact, it is defined in "
ZTUtils.Zope" (but exported via "ZTUtils")and you can look there for its signature.--Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-16 Thread Erik Billing
On 4/11/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
Erik Billing wrote at 2006-4-10 20:38 +0200:> ...>This works fine, except that it's a bit clumsy and has one big error; I>catch just any exception that arises from the>files.append(fileIterator.next
())-call,>and swallow it.In fact, you should *NEVER* do this.I totally agree 
>I've tried catching only the Unauthorized-exception, but an>anonymus user does not have access to the Unauthorized-exception, so I can't>specify is in my except-declaration without getting a new authorization
>error.The "README" in "Products/PythonScripts" (unmong others) tellsyou how to allow the import of usually protected ressources.--Dieter

Thanx, it
worked fine when I allowed the unauthorized module, but I still wonder if this
is the way I *should* do it, is there no easier way that does not incorporate
an python script (or a similar clumsy dtml solution). It just feels a little overkill
to write a specific script just to access the files in a directory. 

/Erik
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Permissions, files and folders

2006-04-10 Thread Erik Billing
Hi!I just started looking at zope, so this might be a pretty nooby question, but I didnt find an answere anywhere, so...I want to create a DTML Method that lists the files in a folder that the current user has access to. Problem is that the objectValues-method returns all files simultaniously, so I get a 

AccessControl.unauthorized.Unauthorized exception when I call the method. I did a litle python script that iterates over the objectValues and catches the errors raised from unauthorized files as folows:files = []
fileIterator = iter(container.objectValues('File'))while True:    try:        files.append(fileIterator.next())    except Exception, e:    if isinstance(e,StopIteration):    break
    else:    files.append(e)return files

This works
fine, except that it's a bit clumsy and has one big error; I catch just any
exception that arises from the files.append(fileIterator.next())-call, and swallow
it. I've tried catching only the Unauthorized-exception, but an anonymus user
does not have access to the Unauthorized-exception, so I can't specify is in my
except-declaration without getting a new authorization error. All thaw it works fine to catch all exceptions for a simple
directory listing like this, its defiantly nothing I wanna put into a larger application.




So my question
is, how do I do this in a nicer way?

Thanx /Erik
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )