to use ldap login with MS Active Directory:: from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth( mode='ad', server='my.domain.controller', base_dn='ou=Users,dc=domain,dc=com'))
to use ldap login with Notes Domino:: auth.settings.login_methods.append(ldap_auth( mode='domino',server='my.domino.server')) to use ldap login with OpenLDAP:: auth.settings.login_methods.append(ldap_auth( server='my.ldap.server', base_dn='ou=Users,dc=domain,dc=com')) to use ldap login with OpenLDAP and subtree search and (optionally) multiple DNs: auth.settings.login_methods.append(ldap_auth( mode='uid_r', server='my.ldap.server', base_dn=['ou=Users,dc=domain,dc=com','ou=Staff,dc=domain,dc=com'])) or (if using CN):: auth.settings.login_methods.append(ldap_auth( mode='cn', server='my.ldap.server', base_dn='ou=Users,dc=domain,dc=com')) whatever you do this will work with Auth, so you can create roles in web2py. These would be web2py roles and not ldap roles. On Mar 10, 4:55 pm, Ialejandro <ialejandr...@gmail.com> wrote: > Hi! I have this question, how could I use LDAP auth and use roles. So > I need to take the users from an active directory (microsoft exchange) > and they must have a role. > > How could I do that?? I need 2 basic roles, Boss, User (boss can > create, delete) and have access to every controller in the app, while > user just can acces to some pages. Is it possible??