Re: [Zope] Pluggable Auth Service ... how is it used?

2005-07-07 Thread Jens Vagelpohl


On 7 Jul 2005, at 06:41, Richard Jones wrote:


I'd like to get session-based login going, and on the surface PAS  
appears to

support that.

First up, is there any documentation?

I've set up in my PAS acl_users the following objects:

1. cookies - a Cookie Auth Helper active for Challenge
2. session - a Session Auth Helper active for  Extraction, Update
Credentials and Reset Credentials
3. users   - a ZODB User Manager with a single user test
4. roles   - a ZODB Role Manager with the test user assigned to  
Manager


Then accessing a Manager protected method inside the folder  
brings up the
login form from the Cookie Auth Helper, but submitting that form  
does nothing

(it returns the empty form to me).



Add Extraction to the cookie object. Only the cookie object would  
know how to extract credentials coming back from the cookie object's  
challenge. Makes sense, doesn't it?


I have described such a setup before either here or on the PAS list  
itself, take a look at the archives. The very first challenge and  
extraction is done by the cookie auth helper, and the credentials are  
then stored by the session auth helper which is doing all extractions  
after that.


jens


___
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] Why don't work?

2005-07-07 Thread Garito

bruno modulix escribió:


Garito wrote:
 


bruno modulix escribió:

   


Garito wrote:

 


Lennart Regebro escribió:

   


A wild guess: Your post works, but returns a redirect to a nother
page, which returns nothing. This will look exactly like notyhing
happened at the browser side.
 


Yes, looking at Z2.log it seems it but If I execute the action url
manually it works like I expect

Any idea?
   


Since we're not able to guess what your code is doing (well, I, at
least, am not able to...), you could perhaps post it ?

One thing that strikes me is the final slash in
POST /Papeles/Yanged/Links/Eliminar/

What is Eliminar, exactly ?

 

Links/Eliminar is the execution path 
   



sarcastic
Oh yes ? Really ? I sure wouldn't have guessed
/sarcastic

 


(using traverse_subpath)

But if I execute the action URL directly on the browser it works fine

   



Garito, if you expect anyone here to be of any help, please provide
*useful* informations. When I ask  What is Eliminar, exactly ?, I
of course mean what kind of object is it (ie: a dtml method, a python
script, etc...).

PS: You may want to read this:
http://www.catb.org/~esr/faqs/smart-questions.html

 


Hi Bruno
http://yanged:8280/Papeles/Yanged/Links/Eliminar is an url that if I 
call it from my browser executes some python scripts that I define in a 
XML file


Then Eliminar is a string not an object nor a method because, as I told 
you some mails ago, I has it via traverse_subpath
The real Object (travesed) is Yanged that is a mixed object with a 
ZCatalog and a folder (like plone portal_catalog)


When I ask for Yanged/Links/Eliminar I ask to the XML file to see what 
Python Scripts or Page Templates give back to me and the I execute them


But, I think its very interesting for me that an action url don't work 
if I submit the form but works if I call it directly from the browser. 
Interesant, no?


Thanks
PD: thanks for the smart-questions page, very interessant!
PD2: sorry for the personal mail I send you (2 mails) but if you push 
reply button only the personal email is used. It's necesary to push 
reply all one, sorry!


--
Mis Cosas
http://blogs.sistes.net/Garito/


___
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] 'level DEBUG' vs. 'debug-mode on'

2005-07-07 Thread Rakotomandimby Mihamina
Hi,

I wonder the difference between

debug-mode on

and

eventlog
  level DEBUG
  logfile
path $INSTANCE/log/event.log
level DEBUG
  /logfile
/eventlog

Would you explain me please?

-- 
Miroir de logiciels libreshttp://www.etud-orleans.fr

___
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] 'level DEBUG' vs. 'debug-mode on'

2005-07-07 Thread Andreas Jung



--On 7. Juli 2005 13:10:30 +0200 Rakotomandimby Mihamina 
[EMAIL PROTECTED] wrote:



Hi,

I wonder the difference between

debug-mode on

and

eventlog
  level DEBUG
  logfile
path $INSTANCE/log/event.log
level DEBUG
  /logfile
/eventlog

Would you explain me please?


Both have nothing in common. debug-on is carefully explained in 
etc/zope.conf. The same applies to the 'level' paramter.


-aj

pgpdIE5omKWEB.pgp
Description: 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 )


Re: [Zope] Why don't work?

2005-07-07 Thread bruno modulix
Garito wrote:
 bruno modulix escribió:
 
(snip)

 Hi Bruno
 http://yanged:8280/Papeles/Yanged/Links/Eliminar is an url that if I
 call it from my browser executes some python scripts that I define in a
 XML file
 
 Then Eliminar is a string not an object nor a method because, as I told
 you some mails ago, I has it via traverse_subpath

mmm...

 The real Object (travesed) is Yanged that is a mixed object with a
 ZCatalog and a folder (like plone portal_catalog)

Ok, that's what I wanted to know...

 When I ask for Yanged/Links/Eliminar I ask to the XML file to see what
 Python Scripts or Page Templates give back to me and the I execute them
 
 But, I think its very interesting for me that an action url don't work
 if I submit the form but works if I call it directly from the browser.

thinking-out-loud
1/ Do you call it exactly the same way ? ie:
http://yanged:8280/Papeles/Yanged/Links/Eliminar/;
or
http://yanged:8280/Papeles/Yanged/Links/Eliminar;

2/ When you call it 'directly from the browser', you send a GET request.
When you call it from the form, you send a POST request. This may have
something to do with your problem... Are you sure you end up calling the
same component in both cases ? Is there any component involved that act
differently depending on the HTTP method ?
/thinking-out-loud

Sorry, nothing more... :(

-- 
Bruno Desthuilliers
Développeur
[EMAIL PROTECTED]
___
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] Make hidden input

2005-07-07 Thread David Pratt
Hi. I am trying to use the make_hidden_input function in ZTUtils to 
create a hidden input in a ZPT but it does not appear.


I am using this:

form name=language_delete_form action=actions_language_summary   
method=post  enctype=multipart/form-data

tal:define=mhi python:modules['ZTUtils'].make_hidden_input;
 dummy python:mhi(delete_ids=results)

results is a list of dictionaries I want to pass to the form method

Can someone point out what I doing wrong? Many thanks.

Regards,
David
___
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] Make hidden input

2005-07-07 Thread Andreas Jung



--On 7. Juli 2005 12:00:32 -0300 David Pratt [EMAIL PROTECTED] wrote:


Hi. I am trying to use the make_hidden_input function in ZTUtils to
create a hidden input in a ZPT but it does not appear.

I am using this:

form name=language_delete_form action=actions_language_summary
method=post  enctype=multipart/form-data
tal:define=mhi python:modules['ZTUtils'].make_hidden_input;
 dummy python:mhi(delete_ids=results)


This code is odd. First you should something to appear inside the scope
of a form tag inside a dedicated tag. And you're defining mhi and dummy 
using tal:define but you don't them anywhere neither using tal:content nor 
tal:replace.


-aj



pgpweeJQuRZYU.pgp
Description: 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 )


Re: [Zope] Make hidden input

2005-07-07 Thread Lennart Regebro
On 7/7/05, David Pratt [EMAIL PROTECTED] wrote:
 Hi. I am trying to use the make_hidden_input function in ZTUtils to
 create a hidden input in a ZPT but it does not appear.

Well, then, whats the problem?! :-) (sorry)
 
 form name=language_delete_form action=actions_language_summary
 method=post  enctype=multipart/form-data
 tal:define=mhi python:modules['ZTUtils'].make_hidden_input;
  dummy python:mhi(delete_ids=results)

tal:block replace=structure python:mhi(delete_ids=results) / 
Seems more reasonable then just assigning it to a dummy variable,

Not that I have ever used make_hidden_input, mind you, I make input
type=hidden / instead. Seems easier.

-- 
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] Make hidden input

2005-07-07 Thread Peter Bengtsson
form name=language_delete_form action=actions_language_summary
 method=post  enctype=multipart/form-data
 tal:define=mhi python:modules['ZTUtils'].make_hidden_input;
  dummy python:mhi(delete_ids=results)
br tal:replace=structure dummy /

On 7/7/05, David Pratt [EMAIL PROTECTED] wrote:
 Hi. I am trying to use the make_hidden_input function in ZTUtils to
 create a hidden input in a ZPT but it does not appear.
 
 I am using this:
 
 form name=language_delete_form action=actions_language_summary
 method=post  enctype=multipart/form-data
 tal:define=mhi python:modules['ZTUtils'].make_hidden_input;
  dummy python:mhi(delete_ids=results)
 
 results is a list of dictionaries I want to pass to the form method
 
 Can someone point out what I doing wrong? Many thanks.
 
 Regards,
 David
 ___
 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 )
 


-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Make hidden input

2005-07-07 Thread David Pratt
Super, that solved the problem.  I had googled and couldn't find an 
example of mhi. Only the api docs which didn't say very much about 
using it in a form. I guess it should have occurred to me to use 
structure if the output is html.  Problem was that I hadn't actually 
seen an example of the output of this function anywhere - so not quite 
sure if I had to make an input tag myself and the function just filled 
the attributes or what. Now I know.


I had a good laugh at what I had written afterwards, go figure a hidden 
field that will not appear, hmm...  what could be wrong with that - 
except maybe too much time at a computer :-)


Sorry Andreas on the small piece of zpt I provided, there is much more 
to the form but thought what I provided would illustrate what I was 
trying to do.


Many thanks.

Regards,
David

On Thursday, July 7, 2005, at 12:12 PM, Lennart Regebro wrote:


On 7/7/05, David Pratt [EMAIL PROTECTED] wrote:

Hi. I am trying to use the make_hidden_input function in ZTUtils to
create a hidden input in a ZPT but it does not appear.


Well, then, whats the problem?! :-) (sorry)

___
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] BTreeFolder doubleclick patch

2005-07-07 Thread Peter Bengtsson
Shane (and the Zope list),
I've patched your lovely BTreeFolder2 product (version 1.0.1) so that
I can doubleclick on options in the dropdown instead of having to
click the Edit button. This is using Javascript and if Javascript is
disabled, nothing happens, it just goes back to what it was like
before.

I've attached two patch files that you can chose to include. 

PS. 
To install the patch, this works for me:
$ cd zope/Products/BTreeFolder2/
$patch -p1  BTreeFolder2.py.patch

-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] BTreeFolder doubleclick patch

2005-07-07 Thread David Pratt
Hi Peter or Shane.  I have been using nested CMFBTreeFolders inside a 
CMF instance but I am not clear on difference between CMFBTreeFolder 
and BTreeFolder2. I am trying to limit the number of objects to 2000 
per folder. Either folder type can be made inside a CMF site. Should I 
be using CMFBTreeFolder or BTreeFolder2 for CMF?


Regards,
David

On Thursday, July 7, 2005, at 01:34 PM, Peter Bengtsson wrote:


Shane (and the Zope list),
I've patched your lovely BTreeFolder2 product (version 1.0.1) so that
I can doubleclick on options in the dropdown instead of having to
click the Edit button. This is using Javascript and if Javascript is
disabled, nothing happens, it just goes back to what it was like
before.

I've attached two patch files that you can chose to include.

PS.
To install the patch, this works for me:
$ cd zope/Products/BTreeFolder2/
$patch -p1  BTreeFolder2.py.patch

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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 )


[Zope] Zope Newbie

2005-07-07 Thread Emmanuel V. Salvador
Greetings to zope.

I have just installed zope that came with the mandriva2000le(mandrake 10.2) 
and tried the excercise in the ZopeBook.  All has been well until the 
guestbook exercise wherein a particular python script was granted manager 
rights in the proxy tab.

Upon trying out the page with the script as an anonymous user, I'm asked for a 
username and password.  According to the book, this was not suppose  to 
happen since I already gave the script manager rights. Please refer to the 
error below.


Site Error

An error was encountered while publishing this resource.

Error Type: Unauthorized
Error Value: You are not allowed to access 'manage_addDTMLDocument' in this 
context

Troubleshooting Suggestions

* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your 
patience. 

Can anybody please give suggestions on how to change access rights for the 
error value above?

Many thanks in advance,


Noel S.
___
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-Coders] Zope tests: 8 OK

2005-07-07 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Wed Jul  6 11:01:02 2005 UTC to Thu Jul  7 11:01:02 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:23:49 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002527.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:25:19 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002528.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:26:49 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002529.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:28:19 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002530.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:29:49 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002531.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:31:19 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002532.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:32:49 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002533.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Wed Jul  6 23:34:19 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002534.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-dev] Re: bridging Zope core interfaces - a small proposal

2005-07-07 Thread yuppie

yuppie wrote:
I propose to move the Five bridging code (bridge.py, 
fiveconfigure.createZope2Bridge and related tests) to the Interface 
package of Zope 2. Five would still ship with a copy of that code for 
Zope 2.7 backwards compatibility.


Based on a suggestion from philiKON and some discussion on IRC I modify 
my proposal:


The bridging code added to Interface should work the other way round, 
bridging newstyle interfaces to oldstyle interfaces.


Existing Zope 2 interfaces should be converted to Zope 3 interfaces and 
bridged back to Zope 2 interfaces for backwards compatibility.


Cheers, Yuppie


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

http://mail.zope.org/mailman/listinfo/zope )


[Zope-DB] Deleting a ZCatalog Object from ZODB

2005-07-07 Thread Takahashi, Michael








Hi Guys,



I have successfully setup Zope to query a MySQL database and
catalog the data using the infamous Catalog Anything technique (http://zope.org/Members/rbickers/cataloganything). One caveat
that occurs is that when you delete an object from the MySQL database and you
run the Python script to update the ZCatalog, the deleted entry will still reside
in the ZCatalog unless you update the catalog from the Advanced tab. But
there must be another more efficient way to delete just the single object in
the ZCatalog.



Using catalog_object() you can insert the data into the ZCatalog.
Is there a function (to be used in the Python Script) that can remove object
from the ZCatalog as well?



Thanks,



Mike










___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db