[Zope] Re: Intercept request

2008-01-07 Thread Josef Meile

BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best option within Zope. Thoughts?

I guess if you want to do this easily inside zope, then a script is the
way to go. Somebody already posted a dtml solution; however, I think it
is better you put it in a python script that will be called from your
standard_header file, which can be either a dtml method or a page
template.

A request hook will require you to patch zope, write a monkey patch, or
some kind of UserFolder based on ip addresses, which means to directly
modify zope's code or create an external product. The invested time on
doing this isn't worth, when you can do it easier and in less time, with
either a script or by modifying your proxy's configuration.

I think it would be better to let your proxy do this. This isn't really
hard with nginx:

http://wiki.codemongers.com/NginxHttpAccessModule

Anyway, if you don't have access to the maschine hosting your zope, then
you should try the script solution.

Best regards
Josef
___
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] Re: Intercept request

2008-01-07 Thread Raphael Ritz

David Chelimsky wrote:



[..]


BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best option within Zope. Thoughts?



Are you saying you want an access rule?

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx


Raphael

___
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] Re: Intercept request

2008-01-07 Thread Josef Meile

Raphael Ritz schrieb:

David Chelimsky wrote:



[..]


BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best option within Zope. Thoughts?



Are you saying you want an access rule?

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx 

Well, I guess that would be much easier than the script solution I
mentioned before. You can put your access rule, which is also a script,
on the folder you want to restrict. You have to be careful with this
rules since you can block your access to the site; however, this
can be easily undone.
___
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] Re: Intercept request

2008-01-07 Thread Dieter Maurer
Raphael Ritz wrote at 2008-1-7 16:16 +0100:
David Chelimsky wrote:

[..]

 BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
 simple script that I include on every page, yes? That could work, but
 seems a bit error prone - that's why I'm looking for some sort of
 request hook. But maybe that's my best option within Zope. Thoughts?
 

Are you saying you want an access rule?

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx

When SiteAccess AccessRules are used for security critical demands
then one has to keep in mind that they can be disabled via special
segments in the url.

In such a case, I would remove the code that makes this possible.



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