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()
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()
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
def __init__(self): self.extUserList = { "Nice": NiceUser, LDAPAuthenticator.getId(): LDAPUser }
def __init__(self): self.extUserList = {"Nice": NiceUser, LDAPAuthenticator.getId(): LDAPUser}