equal
deleted
inserted
replaced
25 import ldap |
25 import ldap |
26 from ldap.filter import escape_filter_chars |
26 from ldap.filter import escape_filter_chars |
27 |
27 |
28 from rql.nodes import Relation, VariableRef, Constant, Function |
28 from rql.nodes import Relation, VariableRef, Constant, Function |
29 |
29 |
|
30 import warnings |
30 from cubicweb import UnknownEid, RepositoryError |
31 from cubicweb import UnknownEid, RepositoryError |
31 from cubicweb.server import ldaputils |
32 from cubicweb.server import ldaputils |
32 from cubicweb.server.utils import cartesian_product |
33 from cubicweb.server.utils import cartesian_product |
33 from cubicweb.server.sources import (AbstractSource, TrFunc, GlobTrFunc, |
34 from cubicweb.server.sources import (AbstractSource, TrFunc, GlobTrFunc, |
34 TimedCache) |
35 TimedCache) |
41 # map ldap protocol to their standard port |
42 # map ldap protocol to their standard port |
42 PROTO_PORT = {'ldap': 389, |
43 PROTO_PORT = {'ldap': 389, |
43 'ldaps': 636, |
44 'ldaps': 636, |
44 'ldapi': None, |
45 'ldapi': None, |
45 } |
46 } |
|
47 |
|
48 |
|
49 # module is lazily imported |
|
50 warnings.warn('Imminent drop of ldapuser. Switch to ldapfeed now!', |
|
51 DeprecationWarning) |
46 |
52 |
47 |
53 |
48 class LDAPUserSource(ldaputils.LDAPSourceMixIn, AbstractSource): |
54 class LDAPUserSource(ldaputils.LDAPSourceMixIn, AbstractSource): |
49 """LDAP read-only CWUser source""" |
55 """LDAP read-only CWUser source""" |
50 support_entities = {'CWUser': False} |
56 support_entities = {'CWUser': False} |