[Zope-dev] LDAPRoleTwiddler / BasicUserFolder
Dirk Datzert
dirk.datzert@tks-rasselstein.thyssenkrupp.com
Thu, 17 Oct 2002 09:39:13 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C275C1.0DB99800
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
I try to solve some problems with LDAPRoleTwiddler an inherited version =
from BasicUserFolder
I currently use a validate()-function which I saw similar in =
BasicUserFolder and in LDAPRoleExtender (modifications from Shane)
My problem is that=20
if self.authorize(user, a, c, n, v, roles):
return user.__of__(self)
in validate() does not work, but
return user.__of__(self)
work better, but does not the same as the API (which I don't know) =
expect.
Can anybody give a hint ?
Regards,
Dirk
used python code:
# This must stay accessible to everyone
def validate( self, request, auth=3D'', roles=3D_noroles ):
""" The main engine """
v =3D request['PUBLISHED'] # the published object
a, c, n, v =3D self._getobcontext(v, request)
name, password =3D self.identify(auth)
user =3D self.authenticate(name, password, request)
if user is not None:
if user is not None:
# On my Test-System it works with authorize()
# On my Integration-System it works only without =
authorize()
#if self.authorize(user, a, c, n, v, roles):
return user.__of__(self)
# Could not twiddle a user. Defer to other user folders.
return None
def authenticate(self, name, password, request):
super =3D self._emergency_user
if name is None:
return None
if super and name =3D=3D super.getUserName():
user =3D super
else:
user =3D self.getUser(name, password)
if user is not None and user.authenticate(password, request):
return user
else:
return None
------=_NextPart_000_0009_01C275C1.0DB99800
Content-Type: text/x-vcard;
name="Dirk Datzert.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Dirk Datzert.vcf"
BEGIN:VCARD
VERSION:2.1
N:Datzert;Dirk
FN:Dirk Datzert
ORG:;Andernach
TEL;WORK;VOICE:+49 2631 81 4595
TEL;WORK;FAX:+49 2631 81 15 4595
ADR;WORK:;;Andernach
LABEL;WORK:Andernach
KEY;X509;ENCODING=3DBASE64:
=
MIIDVTCCAr6gAwIBAgIPAM2aAAAAAkJs9V5JP7ynMA0GCSqGSIb3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