[Zope] Developing 'products' for zope 4 and 5

2020-04-21 Thread Kees de Brabander
Hi,
I am trying to catch up with the innovation that zope has undergone (I still 
have an instance running under zope 2.10.9).
Is there any more extensive documentation on how to develop ‘products’ for zope 
4 and 5. In the Zope Developer’s Guide the chapter on Zope products simply 
starts with the remark that the document is currently being reviewed.
best, cb
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope in The Netherlands

2015-07-08 Thread Kees de Brabander
Hi there,
I desperately need a zope server, at least for a transition period. Is there in 
The Netherlands a company that still uses zope or has experience with zope that 
can help or advise me?
tia, Cornelis J. de Brabander
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope in The Netherlands

2015-07-08 Thread Kees de Brabander
well, it is not a necessity, but a 1) like old-fashoned face to face 
communication and b) I am also curious
cb
On 08 Jul 2015, at 16:02, Andreas Jung li...@zopyx.com wrote:

 Why does it has to be NL?
 
 -aj
 
 
 
 On 8 Jul 2015, at 15:10, Kees de Brabander wrote:
 
 Hi there,
 I desperately need a zope server, at least for a transition period. Is there 
 in The Netherlands a company that still uses zope or has experience with 
 zope that can help or advise me?
 tia, Cornelis J. de Brabander
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

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


[Zope] path of a fileupload instance

2012-11-13 Thread Kees de Brabander
Hiya

I have a form with a field for a FileUpload object, which works ok. However, in 
my application I want to capture the path of that file, because I want to open 
still other files that I know by name from that very same directory.
Any idea how to do that? The REQUEST simple contains the FileUpload instance.

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


Re: [Zope] path of a fileupload instance

2012-11-13 Thread Kees de Brabander
Correct, but the filename attribute contains just the filename, not the path of 
the directory where it was uploaded from…
cb
On Nov 13, 2012, at 11:04 AM, Andreas Jung wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 REQUEST.yourfile.filename.
 The FileUpload instance has a 'filename' attributes.
 
 - -aj
 
 Kees de Brabander wrote:
 Hiya
 
 I have a form with a field for a FileUpload object, which works ok.
 However, in my application I want to capture the path of that file,
 because I want to open still other files that I know by name from
 that very same directory. Any idea how to do that? The REQUEST simple
 contains the FileUpload instance.
 
 ___ Zope maillist  -
 Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **   No
 cross posts or HTML encoding!  ** (Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce 
 https://mail.zope.org/mailman/listinfo/zope-dev )
 
 - -- 
 ZOPYX Limited | Python | Zope | Plone | MongoDB
 Hundskapfklinge 33| Consulting  Development
 D-72074 Tübingen  | Electronic Publishing Solutions
 www.zopyx.com | Scalable Web Solutions
 - --
 Produce  Publish - www.produce-and-publish.com
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQGUBAEBAgAGBQJQohsbAAoJEADcfz7u4AZjiH0Lv1x/09r2C6AakDK3H49l9jh5
 8XvCLHBqbwKep4Ue+f8kKj3BdyDRZsg7ZkaISajndKPO2kyo1eNtBVD7v7XIhCGS
 oTKCLv7BqE5M7Or9YTkhAJR9C4yE+5EWRk7bchkh3f3w4wlFgf/cXaATnD8qm6uL
 CjmzwA3bapX39yyufaIqrifToyzvYu/BgF1g0uEf8NkxwbXP54T0b3hWaDXQZoQ2
 XdWpTKQveV4G9HH5d5koAwD8gDYLIfrTh1T32ESLtrY26qct4fYvC4UU/AgRdbV1
 TWhFNDSmYVXirHsK4odxS2tjCs0yqNAkzPsDMo82d5ZtSw0k7bqspFZrAf0vcZXA
 6joAfyTVX5QI/RliExze4XOF6w+n/g+InV/2ErZtcN0pwk5Y2YcZTrrG8p2v3UxD
 JUpDXsDHzP5A4iQ19VI2eiwdvOXpkFMKkKxcKid7hLuccIUyc2SpygsRnhPXDbpp
 kuo+RIrcYzDs63gJD/jlaWN/BhRROu4=
 =XQX4
 -END PGP SIGNATURE-
 lists.vcf

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


Re: [Zope] path of a fileupload instance

2012-11-13 Thread Kees de Brabander
I was using IE and filename is just the file name, no directory information. So 
I will have to take another approach. Does a FileUpload instance have any other 
attributes than filename and header?

On Nov 13, 2012, at 6:11 PM, Andreas Jung wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 This is subject to browser. All browser - except IE (afaik) - only
 submit the filename without directory information.
 
 - -aj
 
 Kees de Brabander wrote:
 Correct, but the filename attribute contains just the filename, not
 the path of the directory where it was uploaded from? cb On Nov 13,
 2012, at 11:04 AM, Andreas Jung wrote:
 
 REQUEST.yourfile.filename. The FileUpload instance has a 'filename'
 attributes.
 
 -aj
 
 Kees de Brabander wrote:
 Hiya
 
 I have a form with a field for a FileUpload object, which works
 ok. However, in my application I want to capture the path of
 that file, because I want to open still other files that I know
 by name from that very same directory. Any idea how to do that?
 The REQUEST simple contains the FileUpload instance.
 
 ___ Zope maillist
 - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **
 No cross posts or HTML encoding!  ** (Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce 
 https://mail.zope.org/mailman/listinfo/zope-dev )
 lists.vcf
 
 
 - -- 
 ZOPYX Limited | Python | Zope | Plone | MongoDB
 Hundskapfklinge 33| Consulting  Development
 D-72074 Tübingen  | Electronic Publishing Solutions
 www.zopyx.com | Scalable Web Solutions
 - --
 Produce  Publish - www.produce-and-publish.com
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQGUBAEBAgAGBQJQon9AAAoJEADcfz7u4AZjSwsLv0Q6WXixh/gYddZObYa1O3F4
 EmhCoFjfAwgFtT8WkWpTkP4l0myjOUqPdOhJvvBxPIAtqTDPu6V6YEXM5nK1loE4
 Shjz3feKRsxP784arefzD1CpRiN/YQhMSn+ZYMyy/IpHV1Ypy7vsF1HJSaCY8sqm
 yaItArafhVrCrrSwGxOCaUNG83w6m0X0MlEg/phCmW3Lkz4lvwcgehEuiqHGYnrE
 TwpAiBnS4ucjdgR+Zkf9sSmxKkjUiBuYenHgsHZiXwDxYaXQra1NHeCrQha1DASx
 EliQuhN9Qz/A+4ZiAHj9yMwrVDEeK4oCwAxBuSsIxhO48Bj9mjXm33iSkyi0L7o7
 1I0DQqCKl/1Rh6gFUmBtztzAvcz/vtB5tfjZ71u9zdQARd9zX2YKkdRQnA/l+tIG
 WgwbsR/Ium2xyDp9Piqfw0rGlZzLZrp3ekbAHVwdAHR7hqGUh6nXotbJVgCOjTDz
 PorJJ9CA/DZ+SWHQcQXyC8wtImS6zAI=
 =aN3X
 -END PGP SIGNATURE-
 lists.vcf

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


Re: [Zope] [Zope-dev] Zope 4.0, maybe not such a bad idea...

2009-04-13 Thread Kees de Brabander
I'm dutch and have had a decent education and therefore do understand german
as well.
I am not sure what this is all about, but 'ob man Dich nicht von den Listen 
werfen sollte' sounds to me like whether you should not be removed from the
list.
I cannot take that as anything else than a threat, may be not from you
personally, but nevertheless a threat.

I am a part of the silent majority that uses Zope 2 and happily so. I am
willing to keep up with new developments, but have not much time to learn
new tricks of the trade. Discussions like this one make me fear that in the
near future I will have to investigate other solutions.
cb

-Oorspronkelijk bericht-
Van: zope-boun...@zope.org [mailto:zope-boun...@zope.org] Namens Andreas
Jung
Verzonden: maandag 13 april 2009 9:31
Aan: Dieter Maurer
CC: Chris Withers; zope@zope.org
Onderwerp: Re: [Zope] [Zope-dev] Zope 4.0, maybe not such a bad idea...

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 13.04.2009 6:46 Uhr, Dieter Maurer wrote:
 Andreas Jung wrote at 2009-4-12 09:52 +0200:
 ...
 @Dieter: participate or be silent. You are member of the Zope 
 community for years, you are member of the Zope Foundation as a committer
member.
 Such statements are at most laughable based on your record of your 
 active contributions to the Zope community and the active 
 participation within the Zope community.
 
 In a private email, Andreas has threadened to exclude me from the Zope 
 mailing lists -- apparently to get me silent forcefully when I do not 
 obey.

Learn to read and translate. The German text says that some committer are no
longer interested in your ongoing ranting. In fact I tried to explain to
other committers to take you as you are for a very long time.
But the patience is over at some point. And the message does not contain any
thread from MY side about throwing you from the list. I only said that I
would no longer veto against it.

 For me, this looks like dictatorship tendencies start to grow and are 
 soon embracing censorship.
Re-read what Jens wrote some time ago about Only those who participate.

Andreas


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkni6kYACgkQCJIWIbr9KYyoEgCg6NT5gtLgorxpx54SqadM+/E5
NUIAoLUdQbiQQq5wxOplV5OE2fCeaPad
=B1yM
-END PGP SIGNATURE-

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.54/2056 - Release Date: 04/13/09
05:51:00

___
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] [Zope-dev] Zope 4.0, maybe not such a bad idea...

2009-04-13 Thread Kees de Brabander
First, I wrote something completely different.
Second, it seems to me that, in the end, an open source project like zope
proves its reason for existence by the number of people using it, and not by
the number of people contributing (though if I could, I would be delighted
to contribute).
Third, I would like to refer to what I did write.
Fourth, what is meant by 'constructive' and who decides that?

cb
 

-Oorspronkelijk bericht-
Van: Andreas Jung [mailto:li...@zopyx.com] 
Verzonden: maandag 13 april 2009 21:18
Aan: Kees de Brabander
CC: 'Dieter Maurer'; 'Chris Withers'; zope@zope.org
Onderwerp: Re: [Zope] [Zope-dev] Zope 4.0, maybe not such a bad idea...

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 13.04.2009 11:56 Uhr, Kees de Brabander wrote:

 
 For me, this looks like dictatorship tendencies start to grow and are 
 soon embracing censorship.

There is neither dictatorship nor censorship. Only those that participate
and contribute in an active way to the Zope community (there are lots of
possibilities) can steer and take influence.
An open-source project is neither a dictatorship nor democracy nor an
anarchy - a project lives from what each community member contributes to it.
The only purpose of measures appearing as dictatorship is bringing the
project forward. Obviously it seems to be unpopular taking over the ruder in
the same cases but it seems to be the only chance keeping thing going. If
you are interested in the future of Zope then please accept that some people
drive the project forward. We don't like being shot into the back from the
community for taking over responsibility. We all accept critic - as long as
it is constructive.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknjj+oACgkQCJIWIbr9KYyTGQCgzrCzkaX2yx8B+6aeghY9NiaK
bHwAnjcNNfYZmNK6et8cC6E+mZHzYG/g
=KD6A
-END PGP SIGNATURE-

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.54/2056 - Release Date: 04/13/09
05:51:00

___
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] Was Problem using nested dtml-in with zsql

2008-11-08 Thread Kees de Brabander
+1
cb 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Garry
Saddington
Verzonden: zaterdag 8 november 2008 12:54
Aan: zope@zope.org
Onderwerp: Re: [Zope] Was Problem using nested dtml-in with zsql

On Saturday 08 November 2008 06:21, Andreas Jung wrote:
 Any particular reason for using DTML instead of ZPT? DTML is dead.
Firstly let me say that I do not wish to relight the ZPT vs DTML argument,
only to make a few points.

I find this an extraordinary attitude coming from someone so important to
this community. I am sure there are many developments out there relying on
DTML and I am also sure that the developers are earning a living from those
developments. Will employers be happy that the technology used for their
sites is dead ? Will they continue to pay these developers?

Can you give one reason why DTML is bad that is not based on personal
preference, presentation tools or the cognitive ability of developers to
understand where variables are coming from? Does it not work if used
properly?

If someone comes to Zope and prefers to use DTML then let him, don't
criticise instead of help him. Zope is a fantastic piece of software,
however it is used, and its use should be encouraged.

I prefer DTML and always have done and always will, no matter what this list
says and I am sure there are many more like me. DTML is available and is
used, let's support it properly on this list.

While I was learning Zope I had many questions, but I had to work most of
them out myself, not wanting to get lambasted again on this list for using
DTML. 
If help was more forthcoming I'm sure that I would have learned more quickly
rather than in relative isolation.

Is the ZMI going to be re-written using ZPT?


Regards
Garry
___
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 )

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.0/1775 - Release Date: 8-11-2008
9:56

___
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] Best policy to assign policy to assign ids to objects insideBTreeFolder2

2008-07-07 Thread Kees de Brabander
You could use the uuid package (http://pypi.python.org/pypi/uuid/1.30)
cb
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Marco
Bizzarri
Verzonden: maandag 7 juli 2008 14:53
Aan: Zope Users Mailing List
Onderwerp: [Zope] Best policy to assign policy to assign ids to objects
insideBTreeFolder2

Hi all.

I need to create a number of objects inside a BTreeFolder2 container.

I would like to minimize the chances of conflicts, so I'm exploring
possibilities to assign ids; up to now I've found the following:

- timestamps
- random numbers

What is the best choice to reduce the chances of conflicts?

Regards
Marco

--
Marco Bizzarri
http://iliveinpisa.blogspot.com/
___
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 )

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.4.5/1537 - Release Date: 6-7-2008
5:26

___
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] acl_users folder 25000

2008-06-05 Thread Kees de Brabander
 

  _  

Van: Martijn Jacobs [mailto:[EMAIL PROTECTED] 
Verzonden: donderdag 5 juni 2008 15:35
Aan: Kees de Brabander
CC: zope@zope.org
Onderwerp: Re: [Zope] acl_users folder  25000




It appears that the database of my client is not accessible. They can
provide me an excel file with the members. 

The intended application actually is an election. It is a one time thing.
Every member is using this application once, and presumably not all of them.
Would it still be unwise then to put these 25000 accounts in an ordinary
acl_users folder?


You could import the users in a database (like mysql) and authenticate with
a PAS plugin. Performance wise it could be really slow to have 25K users in
a userfolder. 

I found this userfolder today as well :
http://www.simplistix.co.uk/software/zope/simpleuserfolder. You could easily
write a ZSQL method for authentication for this (it's easier than writing a
PAS plugin). If you have time or resources to write a PAS plugin I suggest
to invest some time for that.

 For the moment, MySql and simpleuserfolder would be the easiest way, I
presume. Thanks again, cb 
___
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] acl_users folder 25000

2008-06-04 Thread Kees de Brabander
 

  _  

Van: Martijn Jacobs [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 3 juni 2008 16:13
Aan: Kees de Brabander
CC: zope@zope.org
Onderwerp: Re: [Zope] acl_users folder  25000


Kees de Brabander wrote: 


I have no idea.
I have been looking at the PAS, but did not find to much documentation on
it.
Would it be possible to use a database that my client does maintain?
 
cb

Yes that would be possible. Take a look at
http://plone.org/products/gmailauthplugin as it's a pretty nice example how
to write a plugin yourself. You can also take a look at
https://svn.plone.org/svn/collective/PASPlugins/




It appears that the database of my client is not accessible. They can
provide me an excel file with the members. 

The intended application actually is an election. It is a one time thing.
Every member is using this application once, and presumably not all of them.
Would it still be unwise then to put these 25000 accounts in an ordinary
acl_users folder?

cb

___
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] acl_users folder 25000

2008-06-03 Thread Kees de Brabander
A client of mine wants a site that is only accessible for members. However,
there are more than 25000 members. Are there any reasons that would make it
unwise to populate an ordinary acl_users folder with such a number of user
accounts?
If so, what other options do I have?
tia
Cornelis J. de Brabander
___
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] acl_users folder 25000

2008-06-03 Thread Kees de Brabander
 

  _  

Van: Martijn Jacobs [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 3 juni 2008 15:57
Aan: Kees de Brabander
CC: zope@zope.org
Onderwerp: Re: [Zope] acl_users folder  25000


Kees de Brabander wrote: 

A client of mine wants a site that is only accessible for members. However,
there are more than 25000 members. Are there any reasons that would make it
unwise to populate an ordinary acl_users folder with such a number of user
accounts?
If so, what other options do I have?

If it's possible to use a existing userdatabase or authentication source I
would prefer to use that. With
http://www.zope.org/Products/PluggableAuthService/
http://www.zope.org/Products/PluggableAuthService/ it's very easy to let
zope authenticate against any kind of database or source (including
MySQL/LDAP etc). And if it's a custom source it's not difficult to write
your own authentication plugin.

Where and how are these accounts stored now? LDAD/ADS or something else?

I have no idea.
I have been looking at the PAS, but did not find to much documentation on
it.
Would it be possible to use a database that my client does maintain?
 
cb
___
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] acl_users folder 25000

2008-06-03 Thread Kees de Brabander
Ok, thanks I'll check it out.
cb

  _  

Van: Martijn Jacobs [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 3 juni 2008 16:13
Aan: Kees de Brabander
CC: zope@zope.org
Onderwerp: Re: [Zope] acl_users folder  25000


Kees de Brabander wrote: 


I have no idea.
I have been looking at the PAS, but did not find to much documentation on
it.
Would it be possible to use a database that my client does maintain?
 
cb

Yes that would be possible. Take a look at
http://plone.org/products/gmailauthplugin as it's a pretty nice example how
to write a plugin yourself. You can also take a look at
https://svn.plone.org/svn/collective/PASPlugins/


Martijn


-- 

Martijn Jacobs

Four Digits, Internet Solutions



a: Willemsplein 15-1 6811 KB Arnhem NL 

kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl

tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.24.6/1480 - Release Date: 3-6-2008
7:00


___
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] trying to implement server side xsl transform

2007-10-25 Thread Kees de Brabander
I don't fully understand what your are doing, though I am interested in a
xsl transformations in Zope. 
Your dtml must fail, however, because you can't use a dtml-tag within a
python expression. I would upload the xml document as a dtml-document and
call it just by its name.
By the way: what role does 4suite play in your process?
If you have a working solution, would you be willing to share it?
cb

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Thomas
Bennett
Verzonden: woensdag 24 oktober 2007 23:02
Aan: zope@zope.org
Onderwerp: [Zope] trying to implement server side xsl transform

Zope Version(Zope 2.10.3-final, python 2.4.3, linux2) 
using zeo storage

I am trying to implement a server side XSL Transform with the 
tools I have installed.   I have 4suite, libxml2,  and  libxsl.   The 
all of the files are dtml documents.

Listing 1 below works on the command line and writes an html file named
'foo' to the file system. So I added a def, a parameter to receive, and
indent Listing 1 appropriately to run as an External Method.  I also found,
from this list in September 2006, an almost identical External Method using
parseDoc instead of parseFile, and SaveToString instead of SaveToFile, see
Listing 2 and the traceback that follows it.

  All combinations and attempts to use an External Method result in either
parseDoc or parseFile failing.  Also, the Zope server will not respond to
WEB clients for as long as it is trying to process the External Method and
Apache times out in about 100 seconds  with a Proxy error and I usually have
to restart the Zope server to get access back to it through a WEB client
although ps doesn't show any unusual processor or memory usage.

  I have tried using Listing 1 and then read the file back in to return the
html text but still get the same result, parse failed.

The test page, a dtml document, making the call only contains:

dtml-call C_xml2html('dtml-var 0418rice.xml') or dtml-call
expr=C_xml2html('dtml-var 0418rice.xml')


Thanks for any help,

Thomas




Listing 1  command line python script that works

import libxml2
import libxslt

myxml=http://www.library.appstate.edu/appcoll/ead2002/0418rice.xml;
styledoc =
libxml2.parseFile(http://www.library.appstate.edu/appcoll/ead2002/styles/ea
dbase.xsl)
style=libxslt.parseStylesheetDoc(styledoc)
doc=libxml2.parseFile(myxml)
result=style.applyStylesheet(doc, None)
style.saveResultToFilename(foo,result,0)
style.freeStylesheet()
doc.freeDoc
result.freeDoc()


Listing 2  External Method python script
**
import libxml2
import libxslt

stylestring = file(/var/zope/Extensions/eadbase.xsl).read()

def xml2html(xmlfile):

  styledoc = libxml2.parseDoc(stylestring)
  style=libxslt.parseStylesheetDoc(styledoc)
  doc=libxml2.parseDoc(xmlfile)
  result=style.applyStylesheet(doc, None)
  html=style.saveResultToString(result)
  style.freeStylesheet()
  doc.freeDoc
  result.freeDoc()
  return html


Traceback from the call using Listing 2

2007-10-24T16:29:56 ERROR Zope.SiteErrorLog
http://www.library.appstate.edu/appcoll/ead2002/_xmlxsltest.html
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - DTMLMethod at /appcoll/ead2002/_xmlxsltest.html
   - URL:
http://www.library.appstate.edu/appcoll/ead2002/_xmlxsltest.html/manage_
main
   - Physical Path: /appcoll/ead2002/_xmlxsltest.html
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: C_xml2html
  Module string, line 1, in expression
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: (('dtml-var 0418rice.xml',), {}, None)
  Module /var/zope/Extensions/xmlxsltests.py, line 11, in xml2html
  Module libxml2, line 1224, in parseDoc
parserError: xmlParseDoc() failed



-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25
pictures per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

Library Systems Help Desk: http://www.library.appstate.edu/help/

___
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 )



-- 
No virus found in this incoming message.
Checked 

RE: [Zope] trying to implement server side xsl transform

2007-10-25 Thread Kees de Brabander
Interesting. Thanks. 
cb 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens
Martijn Faassen
Verzonden: donderdag 25 oktober 2007 14:53
Aan: Kees de Brabander
CC: [EMAIL PROTECTED]; zope@zope.org
Onderwerp: Re: [Zope] trying to implement server side xsl transform

Hello,

Concerning xslt transformations, you might want to consider an easier API to
use the XSLT infrastructure in libxml2/libxslt: lxml. See
http://codespeak.net/lxml

Regards,

Martijn



--
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.10/1091 - Release Date: 24-10-2007
14:31


___
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] How can I get graph statistics

2007-10-11 Thread Kees de Brabander
I am very pleased with chartdirector (www.advsofteng.com). Not free, but
relatively cheap and good support.
cb

  _  

Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Jonathan
Salazar Santos
Verzonden: donderdag 11 oktober 2007 6:33
Aan: zope@zope.org
Onderwerp: [Zope] How can I get graph statistics


I am wondering if..., ¿Could some body tell me (help me) how to do graph
statistics on the fly with DTML or python? 

I need to create reports with statistics on the fly.

Some howto... I will apreciate, thanks in advance.

-- 
Jonathan Salazar

 
___
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] how to detect when a object is added through the zmi

2006-08-10 Thread Kees de Brabander
Hi,
Still learning and puzzling. I have an container object based on a product.
I want to detect when a DTMLMethod with a specific id is added through the
zmi, as to fire further action.
Do I have any option?
tia, cb

___
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] adding product-based objects programmatically

2006-08-05 Thread Kees de Brabander

- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: Jens Vagelpohl [EMAIL PROTECTED]; [Zope] Mailing List
zope@zope.org
Sent: Friday, August 04, 2006 8:11 PM
Subject: Re: [Zope] adding product-based objects programmatically


 Kees de Brabander wrote at 2006-8-3 20:39 +0200:
  ... adding additional objects ...
 Thanks anyway, problem solved, even when done in the __init__ of
Queryset.
 Would manage_afterAdd a more sensible place for it?

 You cannot do it in __init__ when the object needs a correct
 acquisition chain (which is not the case in __init__).
 This is the case, for example, when the object needs to be indexed.

 When you add further objects in manage_afterAdd, you have to be
 aware, that manage_afterAdd is not only called when the object
 is initially created but also for rename/move/copy. In all those cases,
 your objects are likely to be already there. This means that you have
 explicitely to check for this case.

Googling and puzzling I became aware of that fact. Thanks for your concern.
cb

___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
hi,
- Original Message - 
From: Jens Vagelpohl [EMAIL PROTECTED]
To: [Zope] Mailing List zope@zope.org
Sent: Wednesday, August 02, 2006 12:52 PM
Subject: Re: [Zope] adding product-based objects programmatically


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 On 2 Aug 2006, at 06:37, Kees de Brabander wrote:

  Hi,
  Apparently my knowledge of Zope/Python is still to limited.
  I have a product that derives from Folder. When I add this product
  to a
  folder via zmi I want to have it populated with other products to it
  programmatically. I tried to do so in the __init__ function. That
  works with
  objects like acl_user folders, but not with products in the products
  directory. Can anyone send me in the right direction or at least
  give a hint
  where to look for a solution?

 Do not do this in __init__ as you have no acquisition at that point.
 Use manage_afterAdd for that.

 jens

Your remark appeared (and presumably is) valid, although I do not understand
why adding acl_user folders has no problems with that. So, I additionally
defined manage_afterAdd. However I got the same error. Any more pointers? By
the way, where are 'manage_afterAdd' and friends documented?
tia, cb

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()

def manage_afterAdd(self, item, container):
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)
if REQUEST is not None:
dispatcher.manage_main(dispatcher, REQUEST)


Traceback (innermost last):

  a.. Module ZPublisher.Publish, line 101, in publish
  b.. Module ZPublisher.mapply, line 88, in mapply
  c.. Module ZPublisher.Publish, line 39, in call_object
  d.. Module Products.QuerySet.QuerySet, line 81, in manage_addQuerySet
  e.. Module OFS.ObjectManager, line 276, in _setObject
  f.. Module Products.QuerySet.QuerySet, line 114, in manage_afterAdd
  g.. Module Products.Query.Query, line 80, in manage_addQuery
AttributeError: Destination



zope 2.7.8, win32



___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
Huh? I included the relevant portions of my source code in my message:

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()

def manage_afterAdd(self, item, container):
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)
if REQUEST is not None:
dispatcher.manage_main(dispatcher, REQUEST)

cb
- Original Message - 
From: Jens Vagelpohl [EMAIL PROTECTED]
To: [Zope] Mailing List zope@zope.org
Sent: Thursday, August 03, 2006 3:05 PM
Subject: Re: [Zope] adding product-based objects programmatically


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
  Your remark appeared (and presumably is) valid, although I do not  
  understand
  why adding acl_user folders has no problems with that. So, I  
  additionally
  defined manage_afterAdd. However I got the same error. Any more  
  pointers? By
  the way, where are 'manage_afterAdd' and friends documented?
 
 Google? The source code? Dunno.
 
a.. Module ZPublisher.Publish, line 101, in publish
b.. Module ZPublisher.mapply, line 88, in mapply
c.. Module ZPublisher.Publish, line 39, in call_object
d.. Module Products.QuerySet.QuerySet, line 81, in  
  manage_addQuerySet
e.. Module OFS.ObjectManager, line 276, in _setObject
f.. Module Products.QuerySet.QuerySet, line 114, in manage_afterAdd
g.. Module Products.Query.Query, line 80, in manage_addQuery
  AttributeError: Destination
 
 This error is obviously coming from your own source code, and since I  
 don't see that code I can't help.
 
 jens
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.1 (Darwin)
 
 iD8DBQFE0fSzRAx5nvEhZLIRAoYGAJ9Ic5o/B0SQoe0k459Lre37f0qwVQCdGXhV
 R9oDTi32WNJNhrIYUidfBSI=
 =diJA
 -END PGP SIGNATURE-
 ___
 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 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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander

- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: Jens Vagelpohl [EMAIL PROTECTED]; [Zope] Mailing List
zope@zope.org
Sent: Thursday, August 03, 2006 7:04 PM
Subject: Re: [Zope] adding product-based objects programmatically


 Kees de Brabander wrote at 2006-8-3 16:25 +0200:
 Huh? I included the relevant portions of my source code in my message:
 
 Module QuerySet.py:
 from Query import manage_addQuery
 class QuerySet(Folder):
 def __init__(self, id, title):
 self.id = id
 self.title = title
 self.manage_addUserFolder()
 
 def manage_afterAdd(self, item, container):
 manage_addQuery(self, id, title)
 
 manage_addQuery in Query.py looks like:
 def manage_addQuery(dispatcher, id, title, REQUEST=None):
 
 nQ=Query(id,title)
 dispatcher.Destination()._setObject(id, nQ)

 Apparently, dispatcher lacks a Destination method.

 Why are you using it?
 Usually dispatcher._setObject is enough.

I must confess that I copied it from an example (don't know which anymore).
Thanks anyway, problem solved, even when done in the __init__ of Queryset.
Would manage_afterAdd a more sensible place for it?

cb

___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
 manage_addQuery in Query.py looks like:
 def manage_addQuery(dispatcher, id, title, REQUEST=None):
 
 nQ=Query(id,title)
 dispatcher.Destination()._setObject(id, nQ)

 Apparently, dispatcher lacks a Destination method.

 Why are you using it?
 Usually dispatcher._setObject is enough.

I remembered and checked: it was taken from the Zope Developer's Guide 2.4
edition on zope.org!!

___
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] adding product-based objects programmatically

2006-08-02 Thread Kees de Brabander
Hi,
Apparently my knowledge of Zope/Python is still to limited.
I have a product that derives from Folder. When I add this product to a
folder via zmi I want to have it populated with other products to it
programmatically. I tried to do so in the __init__ function. That works with
objects like acl_user folders, but not with products in the products
directory. Can anyone send me in the right direction or at least give a hint
where to look for a solution?

With trial and error I came thus far (stripped down to the basics):

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)
if REQUEST is not None:
dispatcher.manage_main(dispatcher, REQUEST)

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.QuerySet.QuerySet, line 80, in manage_addQuerySet
  Module Products.QuerySet.QuerySet, line 107, in __init__
  Module Products.Query.Query, line 80, in manage_addQuery
AttributeError: Destination

zope 2.7.8, win32

tia, cb


___
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] Internet Explorer does not follows redirect, while Firefox does

2006-06-02 Thread Kees de Brabander
I guess your response means it does not solve your problem. However, I won't
be able to help you further. It's just a trick that worked for me. Your use
case must be different then.
cb
- Original Message - 
From: Marco Bizzarri [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: Zope Users Mailing List zope@zope.org
Sent: Thursday, June 01, 2006 12:49 PM
Subject: Re: [Zope] Internet Explorer does not follows redirect,while
Firefox does


 Ok, I've been able to experiment. All my pages have the following in
 the head section:

 meta http-equiv=Cache-Control content=no-cache
 meta http-equiv=Pragma content=no-cache
 meta http-equiv=Expires content=Date.Now
 meta http-equiv=Pragma-directive content=no-cache
 meta http-equiv=cache-directive content=no-cache

 Also, I added, before every redirect, the following:

 request.get('RESPONSE').setHeader('pragma', 'no-cache')

 Any suggestion?

 On 5/31/06, Kees de Brabander [EMAIL PROTECTED] wrote:
  Either
dtml-call RESPONSE.setHeader('pragma','no-cache')
  or
dtml-call RESPONSE.setHeader('Expires',(_.DateTime()-1).rfc822())
  or both in the head section of your page will do the trick.
  cb
 
  - Original Message -
  From: Marco Bizzarri [EMAIL PROTECTED]
  To: Zope Users Mailing List zope@zope.org
  Sent: Wednesday, May 31, 2006 7:33 AM
  Subject: [Zope] Internet Explorer does not follows redirect,while
Firefox
  does
 
 
   Hi all.
  
   I don't think this is a specific Zope problem. However, I'm
   experiencing it in a Zope context, and this is why I'm here asking.
  
   In a custom Zope application, we have a problem with Internet
Explorer.
  
   The application follows a page - submit - redirect - page cycle.
  
   To state more clearly: the page presented to the user can have a link.
   When the user clicks on the link, something is done, and eventually
   the user is redirected to the same page which will display different
   data based on the results of its previous click.
  
   The problem is that when IE sees that the result page has the same URL
   as the first page  it does not reload the page and instead shows me
   the cached version.
  
   The problem is not shown with Firefox.
  
   As far as I can understand, this is an HTTP header issue, but I would
   like to know if anyone already has experienced this problem, and has
   some solution about it.
  
   Regards
   Marco
   --
   Marco Bizzarri
   http://notenotturne.blogspot.com/
   ___
   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 )
  
 
 


 -- 
 Marco Bizzarri
 http://notenotturne.blogspot.com/


___
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] Internet Explorer does not follows redirect, while Firefox does

2006-05-31 Thread Kees de Brabander
Either
  dtml-call RESPONSE.setHeader('pragma','no-cache')
or
  dtml-call RESPONSE.setHeader('Expires',(_.DateTime()-1).rfc822())
or both in the head section of your page will do the trick.
cb

- Original Message - 
From: Marco Bizzarri [EMAIL PROTECTED]
To: Zope Users Mailing List zope@zope.org
Sent: Wednesday, May 31, 2006 7:33 AM
Subject: [Zope] Internet Explorer does not follows redirect,while Firefox
does


 Hi all.

 I don't think this is a specific Zope problem. However, I'm
 experiencing it in a Zope context, and this is why I'm here asking.

 In a custom Zope application, we have a problem with Internet Explorer.

 The application follows a page - submit - redirect - page cycle.

 To state more clearly: the page presented to the user can have a link.
 When the user clicks on the link, something is done, and eventually
 the user is redirected to the same page which will display different
 data based on the results of its previous click.

 The problem is that when IE sees that the result page has the same URL
 as the first page  it does not reload the page and instead shows me
 the cached version.

 The problem is not shown with Firefox.

 As far as I can understand, this is an HTTP header issue, but I would
 like to know if anyone already has experienced this problem, and has
 some solution about it.

 Regards
 Marco
 -- 
 Marco Bizzarri
 http://notenotturne.blogspot.com/
 ___
 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 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] Zope and roles and hierarchy

2006-02-14 Thread Kees de Brabander
But my subfolders are for different groups of users and I want to keep them
apart (so I can throw them away with the subfolder, when their use has
become obsolete).
cb
- Original Message - 
From: Lennart Regebro [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: zope user list zope@zope.org
Sent: Tuesday, February 14, 2006 11:33 AM
Subject: Re: [Zope] Zope and roles and hierarchy


On 2/13/06, Kees de Brabander [EMAIL PROTECTED] wrote:
 [cb] And what are my options if I want to call f1_index directly from f11?

Placing your acl_users folder higher up.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/

___
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] Zope and roles and hierarchy

2006-02-13 Thread Kees de Brabander

- Original Message - 
From: Lennart Regebro [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: zope user list zope@zope.org
Sent: Saturday, February 11, 2006 2:25 PM
Subject: Re: [Zope] Zope and roles and hierarchy


On 2/11/06, Kees de Brabander [EMAIL PROTECTED] wrote:
 f1 (folder, acquisition of view permission disabled, and granted again to
 all roles except Anonymous)
 f1_index (dtml-method)
 f11 (folder)
 acl_users (user folder)
 user1 (user object with user defined 'student' role)
 index_html (dtml-method calling f1_index)

 when calling .../f1/f11 and authenticating as user1 in zope 2.7.3, you
will
 get the page, but in 2.7.8 you are not authorized.

Ah, OK, you are not calling it directly. Yes, that may be one of the
security holes that was patched up in 2.7.4 I think. The solution is
easy: Give index_html a proxy role. In this case Authenticated is
enough. f1_index itself if you call it directly will not be
accessible, and that's how it has to be.

[cb] And what are my options if I want to call f1_index directly from f11?
cb

___
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] Zope and roles and hierarchy

2006-02-12 Thread Kees de Brabander
Ok. This solves a long standing misconception on my part. Somehow I lived
with the idea that the called object should have a proxy role and not the
calling object. Stupid! Thanks.
cb
- Original Message - 
From: Lennart Regebro [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: zope user list zope@zope.org
Sent: Saturday, February 11, 2006 2:25 PM
Subject: Re: [Zope] Zope and roles and hierarchy


On 2/11/06, Kees de Brabander [EMAIL PROTECTED] wrote:
 By refering to 1.10 I did not intend to create the impression that I am
very
 experienced. I am still just an average user and happy with that. But
 consider this use case:

 f1 (folder, acquisition of view permission disabled, and granted again to
 all roles except Anonymous)
 f1_index (dtml-method)
 f11 (folder)
 acl_users (user folder)
 user1 (user object with user defined 'student' role)
 index_html (dtml-method calling f1_index)

 when calling .../f1/f11 and authenticating as user1 in zope 2.7.3, you
will
 get the page, but in 2.7.8 you are not authorized.

Ah, OK, you are not calling it directly. Yes, that may be one of the
security holes that was patched up in 2.7.4 I think. The solution is
easy: Give index_html a proxy role. In this case Authenticated is
enough. f1_index itself if you call it directly will not be
accessible, and that's how it has to be.


___
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] Zope and roles and hierarchy

2006-02-11 Thread Kees de Brabander
Unaware of any security risks I used this feature from zope 1.10.x on and
regularly upgrading my applications I had no problems until zope 2.7.8
cb
- Original Message - 
From: Lennart Regebro [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: David [EMAIL PROTECTED]; zope user list zope@zope.org
Sent: Friday, February 10, 2006 2:49 PM
Subject: Re: [Zope] Zope and roles and hierarchy


On 2/10/06, Kees de Brabander [EMAIL PROTECTED] wrote:
  If so, couldn't we have some extra attribute to a role like upwardly
  mobile? (I want to share a code base for several folders sub-folders
  and I do not wanta to give it anonymous access).
 
 I second that. This used to be possible, at least up to zope 2.7.3.

No, you don't have any rights above where you are created, because you
don't exist there and hence you can not be validated. Implementing
that would be complicated, unnecessary and most likely open up huge
security holes.

 The loss of this feature makes the acquisition concept obsolete to some
 extent.

There may be some difference and some feature which you lost between
2.7.3 and 2.7.8, especially since there was done a lot of security
fixes, but the described functionality was not it, unless Zope 2.7.3
specifically had by mistake opened up this gaping security hole.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/

___
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] Zope and roles and hierarchy

2006-02-11 Thread Kees de Brabander
By refering to 1.10 I did not intend to create the impression that I am very
experienced. I am still just an average user and happy with that. But
consider this use case:

f1 (folder, acquisition of view permission disabled, and granted again to
all roles except Anonymous)
f1_index (dtml-method)
f11 (folder)
acl_users (user folder)
user1 (user object with user defined 'student' role)
index_html (dtml-method calling f1_index)

when calling .../f1/f11 and authenticating as user1 in zope 2.7.3, you will
get the page, but in 2.7.8 you are not authorized.
I have attached an export file with this setup. If you'd like to try, just
give user1 a password of your liking and see for yourself.

More importantly, however, how would one go about making available objects
shared by many subfolders each with its own group of users?

cb

- Original Message - 
From: Lennart Regebro [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: David [EMAIL PROTECTED]; zope user list zope@zope.org
Sent: Saturday, February 11, 2006 12:09 PM
Subject: Re: [Zope] Zope and roles and hierarchy


On 2/11/06, Kees de Brabander [EMAIL PROTECTED] wrote:
 Unaware of any security risks I used this feature from zope 1.10.x on
and
 regularly upgrading my applications I had no problems until zope 2.7.8

Admittedly, I didn't use 1.10, I only discovered Zope two months
later, with 2.0.1. And I don't remember those details that far back.
But at least in 2.4.0, this code was called when you did
user.allowed():
[...]
And hence, you can't have done this after Zope 2.4.0. So I still think
you are talking about something else.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/


f1.zexp
Description: Binary data
___
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] Zope and roles and hierarchy

2006-02-10 Thread Kees de Brabander

- Original Message - 
From: David [EMAIL PROTECTED]
To: zope user list zope@zope.org
Sent: Friday, February 10, 2006 4:44 AM
Subject: [Zope] Zope and roles and hierarchy


 Hello Zope,

 Is it true that even though a user Role like 'author' is defined at zope
 root that users defined lower in the hierarchy *also*  with role
 'author' cannot access objects at root with role 'author' and
 permissions of view and access?

 The online zope book seems to say so.

 If so, couldn't we have some extra attribute to a role like upwardly
 mobile? (I want to share a code base for several folders sub-folders
 and I do not wanta to give it anonymous access).

I second that. This used to be possible, at least up to zope 2.7.3. Not any
more in 2.7.8.
The loss of this feature makes the acquisition concept obsolete to some
extent.
cb

___
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] user account defined outside context of object being accessed

2005-12-16 Thread Kees de Brabander

- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Thursday, December 15, 2005 5:54 PM
Subject: Re: [Zope] user account defined outside context of object being
accessed


 Kees de Brabander wrote at 2005-12-13 22:40 +0100:
  ...
   Module AccessControl.ImplPython, line 449, in validate
   Module AccessControl.ImplPython, line 774, in raiseVerbose
 Unauthorized: Your user account is defined outside the context of the
object
 being accessed.  Access to 'f1_index' of (Folder at /f1), acquired
through
 (Folder at /f1/f11/f111), denied. Your user account, user1, exists at
 /f1/f11/acl_users. Access requires one of the following roles:
 ['Authenticated', 'Manager', 'Owner', 'student'].

 A user defined in /f1/f11/acl_users tries to access the protected
 /f1/f1_index. This is not allowed by Zope security system:
 a user defined in a user folder can only access protected objects
 governed by this user folder.

 In your case, all objects at or below /f1/f11 is governed by
 your user folder (/f1/f11/acl_users). /f1/f1_index does not lie
 within this hierarchy and is therefore not governed.

I am painfully aware now that this is the case, at least starting from zope
2.7.8. I have not tested all versions of zope, but at least up to 2.7.3 zope
had no problem with such a set up.

___
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] user account defined outside context of object being accessed

2005-12-15 Thread Kees de Brabander

- Original Message - 
From: Chris Withers [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Thursday, December 15, 2005 4:24 PM
Subject: Re: [Zope] user account defined outside context of object being
accessed


 Kees de Brabander wrote:
  Unauthorized: Your user account is defined outside the context of the
object
  being accessed.  Access to 'f1_index' of (Folder at /f1), acquired
through
  (Folder at /f1/f11/f111), denied. Your user account, user1, exists at
  /f1/f11/acl_users. Access requires one of the following roles:
  ['Authenticated', 'Manager', 'Owner', 'student'].

 Looks like you were inadvertantly taking advantage of a security hole in
 Zope that got plugged. That said, your example was extremely complicated.

Well, that's life ;)


 Can you come up with as simple an example as possible so that we can
 maybe help you out?

I can't make the example more simple than I did.
I guess it boils down to the fact that a user defined in a user folder
somewhere farther down along a path cannot acquire objects higher up that
path when the acquisition of the view permission of that object or its
container is disabled and the view permission granted again to specific
roles. This was possible up to zope version 2.7.3, but not anymore from
2.7.8. Somewhere in between this was changed, but I could not find an
explicit reference. I used this construction a lot of times, so I have to
restructure several applications. I guess that's life as well.
Thanks anyway, cb


___
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] user account defined outside context of object being accessed

2005-12-13 Thread Kees de Brabander
I am in the process of upgrading from zope 2.5.1 (yes very old)
I used to use the following set up. Prototypically I had the following chain
of folders and methods:
f1 (folder)
f1_index (dtmlmethod)
f11 (folder)
acl_users (user folder)
f111 folder
index_html (calling f1_index)
I used f1 to place methods and scripts to be acquired by methods in f111. At
the level of f1 I defined local roles, disabled the acquisition of the view
permission and added that permission on the same level again to existing
roles including the local roles except Anonymous. F11 contained a user
folder populated with accounts with with local roles defined in f1.
The url www.domain.nl/f1/f11/f111 would render the content of f1_index after
logging in with an account from acl_users in f11 (basic authentication),
that is at least up to zope 2.7.3. At least from 2.7.8. on this very same
user is not allowed to access f1_index anymore.
I could solve the problem by moving the user folder from f11 to f1, but
actually I have also f12, f13, f14, and so on, each with its distinct group
of users. The setup described enabled me to remove folders at the second
level when they are not needed any more including the whole group of users
involved. Furthermore, though the second level folders share a group of
methods, some were also specific for specific groups.
Another option would be to disable the acquisition of the view permission
not on the f1 level, but on the f11 level. However, in that case the url
www.domain.nl/f1 would acquire the index_html from the root folder in stead
of disallowing access.
Apparently I have to change my habits. But how do I come near to my use
case?

The error message is most verbose in 2.8.4 and reads:
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - DTMLMethod at /f1/f11/f111/index_html
   - URL: http://localhost:8080/f1/f11/f111/index_html/manage_main
   - Physical Path: /f1/f11/f111/index_html
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module AccessControl.ImplPython, line 184, in guarded_getattr
  Module AccessControl.ImplPython, line 693, in guarded_getattr
  Module AccessControl.ImplPython, line 635, in aq_validate
  Module AccessControl.ImplPython, line 529, in validate
  Module AccessControl.ImplPython, line 449, in validate
  Module AccessControl.ImplPython, line 774, in raiseVerbose
Unauthorized: Your user account is defined outside the context of the object
being accessed.  Access to 'f1_index' of (Folder at /f1), acquired through
(Folder at /f1/f11/f111), denied. Your user account, user1, exists at
/f1/f11/acl_users. Access requires one of the following roles:
['Authenticated', 'Manager', 'Owner', 'student'].


f1.zexp
Description: Binary data
___
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] zopeXMLMethods and zope 2.8.x

2005-10-31 Thread Kees de Brabander
I succeeded using zopeXMLMethods up to zope 2.7.8 after adapting its
__init__.py (see
http://mail.zope.org/pipermail/zope/2005-February/156670.html by Anton
Stonor), which was necessary starting with zope 2.7.3. Trying to use this
very same zopeXMLMethods product (that is with adapted __ini__.py) in zope
2.8.4, however, resulted in exactly the same error I got with the original
__init__.py in zope 2.7.8 (traceback below)???
Does anybody have a solution?
cb

Trying to add a xsltmethod in the zmi brings the authentication dialog up
and results in an unauthorized error:
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 110, in _exec
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - PageTemplateFile at /qp/create
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 651, in do_loop_tal
  Module Products.PageTemplates.TALES, line 206, in setRepeat
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: create
   - Line 70, Column 6
   - Expression: standard:'here/availableProcessors'
   - Names:
  {'container': App.ProductContext.__FactoryDispatcher__ object at
0x036A7E90,
   'context': App.ProductContext.__FactoryDispatcher__ object at
0x036A7E90,
   'default': Products.PageTemplates.TALES.Default instance at
0x02B8ABE8,
   'here': App.ProductContext.__FactoryDispatcher__ object at
0x036A7E90,
   'loop': Products.PageTemplates.TALES.SafeMapping object at
0x03710918,
   'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x02B78E18,
   'nothing': None,
   'options': {'args': ()},
   'repeat': Products.PageTemplates.TALES.SafeMapping object at
0x03710918,
   'request': HTTPRequest,
URL=http://localhost:8080/qp/manage_addProduct/ZopeXMLMethods/create,
   'root': Application at ,
   'template': PageTemplateFile at /qp/create,
   'traverse_subpath': [],
   'user': admin}
  Module Products.PageTemplates.Expressions, line 185, in __call__
  Module Products.PageTemplates.Expressions, line 173, in _eval
  Module Products.PageTemplates.Expressions, line 127, in _eval
   - __traceback_info__: here
  Module Products.PageTemplates.Expressions, line 301, in restrictedTraverse
   - __traceback_info__: {'path': ['availableProcessors'],
'TraversalRequestNameStack': []}
Unauthorized: You are not allowed to access 'availableProcessors' in this
context

___
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] Almost Done.

2000-10-31 Thread Kees de Brabander

hi Jason,
dtml-in tablename by itself does what you ask it to do: it runs through
the rows of your tinytable and that's it. If you want to see the content of
your table, you'll have to construct a html table with fieldnames in the
cells:
table
 tr
  tddtml-var fieldname1/td
  tddtml-var fieldname2/td
  ...
  tddtml-var fieldnameN/td
 /tr
/table
Then you're done.
cb
- Original Message -
From: Jason C. Leach [EMAIL PROTECTED]
To: Erik Enge [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 31, 2000 8:03 AM
Subject: Re: [Zope] Almost Done.


 hi,

 Gave that a shot, no luck.  I just dones nothing where as if I misspel the
 object ID it screams (so it's finding it).  I can edit and View the object
 fine, just not call it.

 I'm running Zope/Zope 2.2.2 (source release,
 python 1.5.2, linux2) ZServer/1.1b1 on FreeBSD A


 j.
 ..
 . Jason C. Leach
 ... University College of the Cariboo.
 ..

 On Tue, 31 Oct 2000, Erik Enge wrote:

  On Mon, 30 Oct 2000, Jason C. Leach wrote:
 
   hi,
 
  Hi.
 
   How do I get a TinyTable to display it's contents?
  
   All I find in the docs is !--in# tablename-- and that does not
   seem to work for me, unles I am lacking a tag?
 
  Try this:
 
  dtml-in tablename
 
  (and next time, post the error message, Zope version and OS you are
  running :-)
 
 


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





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




Re: [Zope] Deleting data using ZSQL

2000-09-29 Thread Kees de Brabander


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 29, 2000 5:17 AM
Subject: [Zope] Deleting data using ZSQL


 Hi,
 
 I am writing a dtml method that deletes data from a database, and I found
 myself unable to do this.  It seems that ZSQL is used to insert, update
 and query a database. but can not use
 "delete from table where var=dtml-var foo"
 

delete from table where var= dtml-sqlvar foo type=string

in your Z SQL method will do the trick, at least it does for me

cb



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