[Zope] BeforeTraverse and SSLAuth

Antonio Beamud Montero antonio.beamud@agora-2000.com
09 Oct 2002 15:50:41 +0200


Reply my self:
I have registered the next:

 handle =3D self.meta_type + '/' + self.getId()=20
 nc =3D BeforeTraverse.NameCaller(self.getId())
 BeforeTraverse.registerBeforeTraverse(container, nc, handle)

And all works fine, but If I have a valid certificate, but the user is
not registered in this folder, the auth traverse try to find in the
parent folder... the parent folder hasn't SSL Auth, then zope prompt's
for a user a password... How I can avoid this? I wan't if the user is
not registered in this folder, zope raises automatically an
"Unauthorized Exception"...

Thanks in advance

El mi=E9, 09-10-2002 a las 11:22, Antonio Beamud Montero escribi=F3:
> Hello all:
> I have a product that is an extension of Folder, and I want to include
> SSL cert. auth when I traverse this extended Folder. I have implemented
> a method that checks the existence of a user in the acl_user inside my
> extended Folder, and a __call__ method that uses this other method. but
> now I don't know how to register this method with BeforeTraverse...
> Inside BeforeTraverse code I saw:
> --------------------->
> def registerBeforeTraverse(container, object, app_handle, priority=3D99):
>     """Register an object to be called before a container is traversed.
>=20
>     'app_handle' should be a string or other hashable value that
>     distinguishes the application of this object, and which must
>     be used in order to unregister the object.
>=20
>     If the container will be pickled, the object must be a callable  =20
>     class instance, not a function or method.
> ----------------------->
> What value I need for 'app_handle'? And for object?, for container I'll
> put self.
>=20
> Thanks in advance.
> --=20
> Microsoft merges technologoies:=20
> Windows CE + Windows ME + Windows NT =3D Windows CEMENT
>=20
> ----
> Antonio Beamud Montero
> Agora Systems S.A.
>=20
> http://www.agoratechnologies.com
>=20
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
--=20
Microsoft merges technologoies:=20
Windows CE + Windows ME + Windows NT =3D Windows CEMENT

----
Antonio Beamud Montero
Agora Systems S.A.

http://www.agoratechnologies.com