Allura/allura/lib/plugin.py
def ldap_conn(who=None, cred=None):
    '''
    Init & bind a connection with the given creds, or the admin creds if not
    specified. Remember to unbind the connection when done.
    '''
    con = ldap.initialize(config['auth.ldap.server'])
    con.bind_s(who or config['auth.ldap.admin_dn'],
               cred or config['auth.ldap.admin_password'])
    return con

    Init & bind a connection with the given creds, or the admin creds if not
    specified. Remember to unbind the connection when done.
    
Init & bind a connection with the given creds, or the admin creds if not
specified. Remember to unbind the connection when done.
Init & bind a connection with the given creds or the admin creds if not specified . Remember to unbind the connection when done .
def ldap_conn(who=None, cred=None):
    con = ldap.initialize(config['auth.ldap.server'])
    con.bind_s(who or config['auth.ldap.admin_dn'],
               cred or config['auth.ldap.admin_password'])
    return con
def ldap_conn ( who = None , cred = None ) : con = ldap . initialize ( config [ 'auth.ldap.server' ] ) con . bind_s ( who or config [ 'auth.ldap.admin_dn' ] , cred or config [ 'auth.ldap.admin_password' ] ) return con
Init & bind a connection with the given creds, or the admin creds if not
specified.
Init & bind a connection with the given creds or the admin creds if not specified .
'''
    Init & bind a connection with the given creds, or the admin creds if not
    specified. Remember to unbind the connection when done.
    '''
who
cred