From b54315e99bf8d8914b3a47209f3e1c5f2960a90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 18 Dec 2018 21:17:10 +0100 Subject: [PATCH] Map user attribute from LDAP --- conf/local.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/local.py b/conf/local.py index 42527da..c129bc4 100644 --- a/conf/local.py +++ b/conf/local.py @@ -70,6 +70,12 @@ AUTHENTICATION_BACKENDS = ( ) AUTH_LDAP_SERVER_URI = "ldap://localhost:389" AUTH_LDAP_USER_SEARCH = LDAPSearch("uid=YNH_APP_ARG_ADMIN,ou=users,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(uid=%(user)s)") +AUTH_LDAP_USER_ATTR_MAP = { + "username": "uid", + "first_name": "givenName", + "last_name": "sn", + "email": "mail", +} AUTH_LDAP_USER_FLAGS_BY_GROUP = { "is_active": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", "is_staff": "cn=sftpusers,ou=groups,dc=yunohost,dc=org",