[Zope] hiding site content based upon a domain? (similar to htaccess)

Martijn Pieters mj@antraciet.nl
Thu, 05 Aug 1999 16:43:49 +0200


At 14:44 05/08/99 , Tony McDonald wrote:
Cheers Martijn,
>That's really cool, it works well. Problem is I'd like to deny access to 
>people who aren't in that domain (preferably with a dtml doc that tells 
>them why). Is there a way of doing this?

Hmm...

Try making a user (anon?) that has an domain spec of *.*.*.*
Also add a user (deny?) that has the domain spec you want to exclude.

Now you _should_ be able to distinguish between the two in your 
standard_html_header and redirect deny to a page telling him that access is 
denied...

If you find that the user anon always matches, try placing it in one the 
acl_users folder one step up in the hierarchy from the folder you defined 
deny in.

All of this untested of course =) YMMV.

Let us know if this works!

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------