Re: [web2py] ldap auth manage user

2015-01-09 Thread Richard Vézina
Here it is, it was not a problem to import validators finally, what I did is import IS_EMAIL() actually... But I am not sure it really solved the issue... You should follow the other thread for more insight... I make a diff with ldap_auth.py from 2.9.5 and there were not to much off sync... Hope

Re: [web2py] ldap auth manage user

2015-01-09 Thread Richard Vézina
Yes, I think it was the conclusion to which we were coming with Massimo that were making my modification to web2py not acceptable... The check has to be done in LDAP contrib... The problem at this level is to have access to web2py validators, if I remember we can't easily import them, we have to c

Re: [web2py] ldap auth manage user

2015-01-08 Thread Carlos Hanson
I'm not talking about forcing username only in all cases. Since I know that for this application and my LDAP server configuration, usernames are okay, so I think that having the option to force a particular login methon is useful. Then we can say login_with_email=False, or something of that nat

Re: [web2py] ldap auth manage user

2015-01-08 Thread Richard Vézina
I think we can't restrick using only username because AD may have been configure to use email address... To me, if I remember, the problem where coming from ldap_auth contrib that is overly convoluted regarding the way it manage login of user, transforming it from email to username to email... In a

Re: [web2py] ldap auth manage user

2015-01-08 Thread Carlos Hanson
I definitely like and agree with your idea about using get_or_create_user() in a login_method that intends to create (or get) a user, but that doesn't eliminate the duplicate entry problem. Perhaps, my suggestion isn't the best for eliminating it either, since it would require an update to ldap

Re: [web2py] ldap auth manage user

2015-01-08 Thread Richard Vézina
I guess any solution si welcome, I didn't have spare time to work on this and because of the many ldap system to be tested against the change to be made I have been reluctante to work on this scince could be very long to finish the refactoring... :( Richard On Thu, Jan 8, 2015 at 2:49 PM, Carlos

Re: [web2py] ldap auth manage user

2015-01-08 Thread Carlos Hanson
Greetings, I've been humming along quite nicely until I released a new application last month which is used by our entire staff rather than our department. Now I have run into the duplicate user problem, but I looked through the code and figured out why. I had forgotten that you mentioned it to

Re: [web2py] ldap auth manage user

2013-08-16 Thread Richard Vézina
Hello Carlos, Yes you have to pass the db, doc is pretty un clear. Also, it stop working because when to tell to manage_user=True it start to check the credential against Active Directory. If you read the doc carefully you will discrover that if there is a password in the password field it will be

[web2py] ldap auth manage user

2013-08-16 Thread Carlos Hanson
I am using ldap_auth. The following example shows an error I received after adding manage_user=True. It is unclear to me why this is a problem. >>> ldap_auth_aux = ldap_auth(mode='ad', ... server='my.domain.controller', ... base_dn='ou=Users,dc=domain,dc=com', ...