def idmap_backend_rfc2307(): try: ad = ActiveDirectory.objects.all()[0] except: return False return idmap_to_enum(ad.ad_idmap_backend) == IDMAP_TYPE_RFC2307
def idmap_backend_rfc2307(): try: ad = ActiveDirectory.objects.all()[0] except: return False return (idmap_to_enum(ad.ad_idmap_backend) == IDMAP_TYPE_RFC2307)
def __init__(self): from freenasUI.directoryservice.models import idmap_to_enum self.__idmap_modules_path = '/usr/local/lib/shared-modules/idmap' self.__idmap_modules = [] self.__idmap_exclude = {'passdb', 'hash', 'adex', 'tdb2'} if os.path.exists(self.__idmap_modules_path): self.__idmap_modules.extend( filter( lambda m: idmap_to_enum(m) and m not in self. __idmap_exclude, map(lambda f: f.rpartition('.')[0], os.listdir(self.__idmap_modules_path))))
def __init__(self): from freenasUI.directoryservice.models import idmap_to_enum self.__idmap_modules_path = '/usr/local/lib/shared-modules/idmap' self.__idmap_modules = [] self.__idmap_exclude = {'passdb', 'hash'} if os.path.exists(self.__idmap_modules_path): self.__idmap_modules.extend( filter( lambda m: idmap_to_enum(m) and m not in self.__idmap_exclude, map( lambda f: f.rpartition('.')[0], os.listdir(self.__idmap_modules_path) ) ) )