def get(self): """ User groups """ passwdList = getPasswdUsers() return map(lambda x:getUserGroups(x) \ if x in passwdList else self.getDefaultGroups(), self.Get('cl_migrate_user'))
def getConfiguredPasswdUsers(self): """ Get users from passwd and discard users which has not .calculate/ini.env. """ USER, DIR = 0, 1 iniEnv = ".calculate/ini.env" return map( lambda x: x[USER], filter( lambda x: path.exists(path.join(x[DIR], iniEnv)), map(lambda x: (x, pwd.getpwnam(x).pw_dir), getPasswdUsers()), ), )
def choice(self): return [""]+sorted(list(set( self.getLdapUserlist()+getPasswdUsers())))
def get(self): """ Migrating users (users above 1000 uid) """ return filter("root".__ne__,getPasswdUsers())