server/sources/ldapuser.py
branchstable
changeset 6887 72d7feeb071e
parent 6886 b571d2d32971
child 6931 0af44a38fe41
child 7029 bae4d11a104b
equal deleted inserted replaced
6886:b571d2d32971 6887:72d7feeb071e
   175         self.authmode = source_config.get('auth-mode', 'simple')
   175         self.authmode = source_config.get('auth-mode', 'simple')
   176         self._authenticate = getattr(self, '_auth_%s' % self.authmode)
   176         self._authenticate = getattr(self, '_auth_%s' % self.authmode)
   177         self.cnx_dn = source_config.get('data-cnx-dn') or ''
   177         self.cnx_dn = source_config.get('data-cnx-dn') or ''
   178         self.cnx_pwd = source_config.get('data-cnx-password') or ''
   178         self.cnx_pwd = source_config.get('data-cnx-password') or ''
   179         self.user_base_scope = globals()[source_config['user-scope']]
   179         self.user_base_scope = globals()[source_config['user-scope']]
   180         self.user_base_dn = source_config['user-base-dn']
   180         self.user_base_dn = str(source_config['user-base-dn'])
   181         self.user_base_scope = globals()[source_config['user-scope']]
   181         self.user_base_scope = globals()[source_config['user-scope']]
   182         self.user_classes = splitstrip(source_config['user-classes'])
   182         self.user_classes = splitstrip(source_config['user-classes'])
   183         self.user_login_attr = source_config['user-login-attr']
   183         self.user_login_attr = source_config['user-login-attr']
   184         self.user_default_groups = splitstrip(source_config['user-default-group'])
   184         self.user_default_groups = splitstrip(source_config['user-default-group'])
   185         self.user_attrs = dict(v.split(':', 1) for v in splitstrip(source_config['user-attrs-map']))
   185         self.user_attrs = dict(v.split(':', 1) for v in splitstrip(source_config['user-attrs-map']))