1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coin_ynh.git synced 2024-09-03 18:16:26 +02:00

Merge pull request #13 from YunoHost-Apps/map_attribute

Map user attribute from LDAP
This commit is contained in:
ljf (zamentur) 2019-08-23 12:51:46 +02:00 committed by GitHub
commit e871b7223a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",