[ldapfeed] Reduce default value for user-attrs-map option (closes #3824889)
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 23 Oct 2014 14:57:02 +0200
changeset 10011 340d4ef55b6f
parent 10010 3dd66bdbfe8e
child 10012 8c2c6fdd8d56
[ldapfeed] Reduce default value for user-attrs-map option (closes #3824889) This is needed because lgc.configuration.Configuration does not allow removing key/value pairs from the default (due to its use of dict.update() internally). Since CWUser.login is required, users of the add-source command will always be able to override it.
server/sources/ldapfeed.py
--- a/server/sources/ldapfeed.py	Tue Apr 29 11:34:42 2014 +0200
+++ b/server/sources/ldapfeed.py	Thu Oct 23 14:57:02 2014 +0200
@@ -126,7 +126,7 @@
           }),
         ('user-attrs-map',
          {'type' : 'named',
-          'default': {'uid': 'login', 'gecos': 'email', 'userPassword': 'upassword'},
+          'default': {'uid': 'login'},
           'help': 'map from ldap user attributes to cubicweb attributes (with Active Directory, you want to use sAMAccountName:login,mail:email,givenName:firstname,sn:surname)',
           'group': 'ldap-source', 'level': 1,
           }),