Example #1
0
def lowercaseLDAPIdentities(dbi, withRBDB, prevVersion):
    """Convert all LDAP identities to lowercase"""
    auth = LDAPAuthenticator()
    total = len(auth.getList())
    idx = auth.getIdx()
    for i, identity in enumerate(auth.getList()):
        print '\r  Processing %d/%d' % (i + 1, total),
        # getId() returns getLogin().lower()
        if identity.getLogin() == identity.getId() or identity.getLogin() not in idx:
            continue
        del idx[identity.getLogin()]
        assert identity.getId() not in idx
        idx[identity.getId()] = identity
        if i % 1000 == 999:
            dbi.commit()
    print
    dbi.commit()
Example #2
0
def lowercaseLDAPIdentities(dbi, prevVersion):
    """Convert all LDAP identities to lowercase"""
    auth = LDAPAuthenticator()
    total = len(auth.getList())
    idx = auth.getIdx()
    for i, identity in enumerate(auth.getList()):
        print '\r  Processing %d/%d' % (i + 1, total),
        # getId() returns getLogin().lower()
        if identity.getLogin() == identity.getId() or identity.getLogin() not in idx:
            continue
        del idx[identity.getLogin()]
        assert identity.getId() not in idx
        idx[identity.getId()] = identity
        if i % 1000 == 999:
            dbi.commit()
    print
    dbi.commit()
Example #3
0
    def __init__(self):

        self.AuthenticatorList = []
        config = Config.getInstance()
        for auth in config.getAuthenticatorList():
            if auth == "Local":
                self.AuthenticatorList.append(LocalAuthenticator())
            if auth == "Nice":
                from MaKaC.authentication.NiceAuthentication import NiceAuthenticator
                self.AuthenticatorList.append(NiceAuthenticator())
            if auth == "LDAP":
                from MaKaC.authentication.LDAPAuthentication import LDAPAuthenticator
                self.AuthenticatorList.append(LDAPAuthenticator())
        self.create = True
Example #4
0
 def __init__(self):
     self.extUserList = {
         "Nice": NiceUser,
         LDAPAuthenticator.getId(): LDAPUser
     }
Example #5
0
 def __init__(self):
     self.extUserList = {"Nice": NiceUser, LDAPAuthenticator.getId(): LDAPUser}