[Zope-dev] Post-Traversal Hook (+Post-Publication Hook)

2003-10-17 Thread Christian Theune
Hi,

I'm cleaning up the alternative BaseRequest for Zope 2.7 right now which
implements a post traversal hook (which will go into 2.8) and discovered
a small issue I would like to get some feedback from.

Originally the patch called all registered methods after the user has
been determined, but before eventually unauthorized is thrown. Therefore
the SecurityManager already could deliver the user object, but it is not
available within the REQUEST as the well known AUTHENTICATED_USER.

Anyway, does anybody see a special reason to call the hooks 

a) before unauthorized
b) after complete successful authorization

I see that there could be two hooks make sense in there, but can't
decide for a single one. (My tummy tells me to go for the one after
complete authentication, so we have the complete REQUEST environment as
in opposition to site access rules.)

Also Dario Lopez-Kaesten came up with a request for a hook that is
called after the publication. Is there anybody objecting such a post
publication hook? Otherwise I would go for 

- implementing post-traversal variant b
- implementing a post-publication hook

Cheers,
Christian

PS: Looks a bit like I should write a proposal on this ...?

-- 
Christian Theune, gocept gmbh  co. kg
http://www.gocept.com - [EMAIL PROTECTED]
fon: 03496 3099112 fax: 03496 3099118 mobile: 0179 7808366


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] Post-Traversal Hook (+Post-Publication Hook)

2003-10-17 Thread robert
what does publication mean in this context?
Robert
Am Freitag, 17. Oktober 2003 11:05 schrieb Christian Theune:
 Hi,

 I'm cleaning up the alternative BaseRequest for Zope 2.7 right now which
 implements a post traversal hook (which will go into 2.8) and discovered
 a small issue I would like to get some feedback from.

 Originally the patch called all registered methods after the user has
 been determined, but before eventually unauthorized is thrown. Therefore
 the SecurityManager already could deliver the user object, but it is not
 available within the REQUEST as the well known AUTHENTICATED_USER.

 Anyway, does anybody see a special reason to call the hooks

 a) before unauthorized
 b) after complete successful authorization

 I see that there could be two hooks make sense in there, but can't
 decide for a single one. (My tummy tells me to go for the one after
 complete authentication, so we have the complete REQUEST environment as
 in opposition to site access rules.)

 Also Dario Lopez-Kaesten came up with a request for a hook that is
 called after the publication. Is there anybody objecting such a post
 publication hook? Otherwise I would go for

 - implementing post-traversal variant b
 - implementing a post-publication hook

 Cheers,
 Christian

 PS: Looks a bit like I should write a proposal on this ...?

-- 
mit freundlichen GrĂ¼ssen

Robert Rottermann
www.redCOR.ch


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] Post-Traversal Hook (+Post-Publication Hook)

2003-10-17 Thread Christian Theune

Am Fr, 2003-10-17 um 13.38 schrieb robert:
 what does publication mean in this context?

I'm referring to the point in time after the method that was addressed
by the request (e.g. index_html or __call__) was callen but hasn't been
given back yet. So after the result of the request is known.

Cheers,
Christian

-- 
Christian Theune, gocept gmbh  co. kg
http://www.gocept.com - [EMAIL PROTECTED]
fon: 03496 3099112 fax: 03496 3099118 mobile: 0179 7808366


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] Post-Traversal Hook (+Post-Publication Hook)

2003-10-17 Thread Paul Winkler
On Fri, Oct 17, 2003 at 01:46:08PM +0200, Christian Theune wrote:
 
 Am Fr, 2003-10-17 um 13.38 schrieb robert:
  what does publication mean in this context?
 
 I'm referring to the point in time after the method that was addressed
 by the request (e.g. index_html or __call__) was callen but hasn't been
 given back yet. So after the result of the request is known.

hmm... the only issue that occurs to me is that the method could take a long
time to complete, whereas pre-publication should generally be very quick.
Don't know if that matters except when debugging in a hurry.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE NOISOME BATMAN!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] Post-Traversal Hook (+Post-Publication Hook)

2003-10-17 Thread Paul Winkler
On Fri, Oct 17, 2003 at 12:15:07PM -0400, Paul Winkler wrote:
 On Fri, Oct 17, 2003 at 01:46:08PM +0200, Christian Theune wrote:
  
  Am Fr, 2003-10-17 um 13.38 schrieb robert:
   what does publication mean in this context?
  
  I'm referring to the point in time after the method that was addressed
  by the request (e.g. index_html or __call__) was callen but hasn't been
  given back yet. So after the result of the request is known.
 
 hmm... the only issue that occurs to me is that the method could take a long
 time to complete, whereas pre-publication should generally be very quick.
 Don't know if that matters except when debugging in a hurry.

duh, never mind, I didn't really read the end of your first message,
in which you clearly propose two hooks, one before and one after publication.
Carry on :-)

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's FANTASTIC BURRITO MAFIOSO!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )