Commit 5c77962e authored by jocelyn's avatar jocelyn
Browse files

Update pyldapdb to 0.7 to support Django 1.8

Require to fix params type to unicode for ldapdb stuff

See https://github.com/django-ldapdb/django-ldapdb/issues/91
parent ad44039d
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -143,16 +143,16 @@ class DSLConfiguration(CoinLdapSyncMixin, Configuration):

class LdapDSLConfig(ldapdb.models.Model):
    base_dn = settings.DSL_CONF_BASE_DN # "ou=radius,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
    object_classes = [b'top', b'radiusObjectProfile', b'radiusprofile', b'ipHost']

    login = CharField(db_column=b'cn', primary_key=True, max_length=255)
    password = CharField(db_column=b'userPassword', max_length=255)
    cleartext_password = CharField(db_column=b'description', max_length=255)
    active = CharField(db_column=b'dialupAccess', max_length=3)
    ipv4_endpoint = CharField(db_column=b'radiusFramedIPAddress', max_length=16)
    ranges_v4 = ListField(db_column=b'radiusFramedRoute')
    object_classes = ['top', 'radiusObjectProfile', 'radiusprofile', 'ipHost']

    login = CharField(db_column='cn', primary_key=True, max_length=255)
    password = CharField(db_column='userPassword', max_length=255)
    cleartext_password = CharField(db_column='description', max_length=255)
    active = CharField(db_column='dialupAccess', max_length=3)
    ipv4_endpoint = CharField(db_column='radiusFramedIPAddress', max_length=16)
    ranges_v4 = ListField(db_column='radiusFramedRoute')
    # This field is multi-valued, but mandatory...
    ranges_v6 = ListField(db_column=b'ipHostNumber')
    ranges_v6 = ListField(db_column='ipHostNumber')

    def __unicode__(self):
        return self.login
+18 −18
Original line number Diff line number Diff line
@@ -529,27 +529,27 @@ class MembershipFee(models.Model):
class LdapUser(ldapdb.models.Model):
    # "ou=users,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
    base_dn = settings.LDAP_USER_BASE_DN
    object_classes = [b'inetOrgPerson', b'organizationalPerson', b'person',
                      b'top', b'posixAccount', b'ldapPublicKey']
    object_classes = ['inetOrgPerson', 'organizationalPerson', 'person',
                      'top', 'posixAccount', 'ldapPublicKey']

    uid = CharField(db_column=b'uid', unique=True, max_length=255)
    nick_name = CharField(db_column=b'cn', unique=True, primary_key=True,
    uid = CharField(db_column='uid', unique=True, max_length=255)
    nick_name = CharField(db_column='cn', unique=True, primary_key=True,
                          max_length=255)
    first_name = CharField(db_column=b'givenName', max_length=255)
    last_name = CharField(db_column=b'sn', max_length=255)
    display_name = CharField(db_column=b'displayName', max_length=255,
    first_name = CharField(db_column='givenName', max_length=255)
    last_name = CharField(db_column='sn', max_length=255)
    display_name = CharField(db_column='displayName', max_length=255,
                             blank=True)
    password = CharField(db_column=b'userPassword', max_length=255)
    uidNumber = IntegerField(db_column=b'uidNumber', unique=True)
    gidNumber = IntegerField(db_column=b'gidNumber', default=2000)
    password = CharField(db_column='userPassword', max_length=255)
    uidNumber = IntegerField(db_column='uidNumber', unique=True)
    gidNumber = IntegerField(db_column='gidNumber', default=2000)
    # Used by Sympa for logging in.
    mail = CharField(db_column=b'mail', max_length=255, blank=True,
    mail = CharField(db_column='mail', max_length=255, blank=True,
                     unique=True)
    homeDirectory = CharField(db_column=b'homeDirectory', max_length=255,
    homeDirectory = CharField(db_column='homeDirectory', max_length=255,
                              default='/tmp')
    loginShell = CharField(db_column=b'loginShell', max_length=255,
    loginShell = CharField(db_column='loginShell', max_length=255,
                              default='/bin/bash')
    sshPublicKey = ListField(db_column=b'sshPublicKey', default=[])
    sshPublicKey = ListField(db_column='sshPublicKey', default=[])

    def __unicode__(self):
        return self.display_name
@@ -561,11 +561,11 @@ class LdapUser(ldapdb.models.Model):
# class LdapGroup(ldapdb.models.Model):
# "ou=groups,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
#     base_dn = settings.LDAP_GROUP_BASE_DN
#     object_classes = [b'posixGroup']
#     object_classes = ['posixGroup']

#     gid = IntegerField(db_column=b'gidNumber', unique=True)
#     name = CharField(db_column=b'cn', max_length=200, primary_key=True)
#     members = ListField(db_column=b'memberUid')
#     gid = IntegerField(db_column='gidNumber', unique=True)
#     name = CharField(db_column='cn', max_length=200, primary_key=True)
#     members = ListField(db_column='memberUid')

#     def __unicode__(self):
#         return self.name
+4 −2
Original line number Diff line number Diff line
Django>=1.8.17,<1.9
psycopg2==2.5.4
python-ldap==2.4.15
# To match django-ldapdb version:
python-ldap>=3.0,<3.1
wsgiref==0.1.2
pydotplus==2.0.2
python-dateutil==2.2
@@ -12,7 +13,8 @@ django-sendfile==0.3.10
django-hijack>=2.1.10,<2.2
django-localflavor==1.1
django-netfields>=0.4,<0.5
django-ldapdb>=0.4.0,<0.5
# Latest with Django <= 1.8 support:
django-ldapdb>=0.8.0,<0.9
django-multiselectfield>=0.1.5
feedparser
six==1.10.0
+11 −11
Original line number Diff line number Diff line
@@ -164,17 +164,17 @@ class VPNConfiguration(CoinLdapSyncMixin, Configuration):

class LdapVPNConfig(ldapdb.models.Model):
    base_dn = settings.VPN_CONF_BASE_DN
    object_classes = [b'person', b'organizationalPerson', b'inetOrgPerson',
                      b'top', b'radiusprofile']

    login = CharField(db_column=b'cn', primary_key=True, max_length=255)
    sn = CharField(db_column=b'sn', max_length=255)
    password = CharField(db_column=b'userPassword', max_length=255)
    active = CharField(db_column=b'dialupAccess', max_length=3)
    ipv4_endpoint = CharField(db_column=b'radiusFramedIPAddress', max_length=16)
    ipv6_endpoint = CharField(db_column=b'postalAddress', max_length=40)
    ranges_v4 = ListField(db_column=b'radiusFramedRoute')
    ranges_v6 = ListField(db_column=b'registeredAddress')
    object_classes = ['person', 'organizationalPerson', 'inetOrgPerson',
                      'top', 'radiusprofile']

    login = CharField(db_column='cn', primary_key=True, max_length=255)
    sn = CharField(db_column='sn', max_length=255)
    password = CharField(db_column='userPassword', max_length=255)
    active = CharField(db_column='dialupAccess', max_length=3)
    ipv4_endpoint = CharField(db_column='radiusFramedIPAddress', max_length=16)
    ipv6_endpoint = CharField(db_column='postalAddress', max_length=40)
    ranges_v4 = ListField(db_column='radiusFramedRoute')
    ranges_v6 = ListField(db_column='registeredAddress')

    def __unicode__(self):
        return self.login