Hi, I'll answer myself:

spacetaxi wrote:
> I want to authenticate users using LDAP. So I modified sosmbprovider
> (see: http://trac.turbogears.org/turbogears/wiki/IdentityManagement )
> accordingly.
>
> The password checking is working now, but I don't want to create a
> TG-User for every LDAP-User, as the list of LDAP-Users is changing
> frequently. Instead I'd like a new TG-User to be created if a
> (LDAP-)User authenticates successfully for the first time.
>
> But when I try to create a new TG-User within the validate_identity
> method (of my ldap-patched sosmbprovider), I get an
> IdentityManagementNotEnabledException. (Identity management IS enabled,
> of course!)

FYI, I've got this working now. The problem disappeared as soon as I
commented out the call to identity.encrypt_password within
User._set_password. Now I've completely removed the password attribute
from my User class, as there's no need to store the passwords in the TG
database, when they are going to be checked by LDAP.

It still seems rather strange to me, that calling
identity.encrypt_password within User._set_password raised
IdentityManagementNotEnabledException... Anyhow, now it's working like
expected, so I don't further investigate this.

-Stephan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to