示例#1
0
class Account(User):
    # LDAP meta-data
    object_classes = ['posixAccount']

    # posixAccount
    uidnumber = LDAPAttribute('uidNumber')
    gidnumber = LDAPAttribute('gidNumber')
    shell = LDAPAttribute('loginShell')
    home = LDAPAttribute('homeDirectory')
    password = LDAPAttribute('userPassword')
示例#2
0
class User(LDAPEntry):
    # LDAP meta-data
    base_dn = LDAP_AUTH_BASEDN
    entry_rdn = ['cn', 'uid']
    object_classes = ['inetOrgPerson']

    # inetOrgPerson
    name = LDAPAttribute('cn')
    email = LDAPAttribute('mail')
    title = LDAPAttribute('title')
    userid = LDAPAttribute('uid')
    surname = LDAPAttribute('sn')
    givenname = LDAPAttribute('givenName')