bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | 477,800 |
def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | 477,801 |
def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | 477,802 |
def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | 477,803 |
def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'getfacl', '-R', dir ] | 477,804 |
def test_imports(context): pname = 'profil_test' ScenarioTest([ ADD + [ 'profile', pname, '-v' ], ADD + [ 'users', '--filename=data/tests_users.csv', '--profile=%s' % pname ], ADD + [ 'users', '--filename=data/tests_users.csv', '--profile=%s' % pname, '--confirm-import' ], GET + [ 'users', '-l' ], GET + [ 'profiles' ],... | def test_imports(context): pname = 'profil_test' ScenarioTest([ ADD + [ 'profile', pname, '-v' ], ADD + [ 'users', '--filename=data/tests_users.csv', '--profile=%s' % pname ], ADD + [ 'users', '--filename=data/tests_users.csv', '--profile=%s' % pname, '--confirm-import' ], GET + [ 'users', '-l' ], GET + [ 'profiles' ],... | 477,805 |
def chk_acls_cmd(user): return [ 'getfacl', '-R', '%s/%s' % ( configuration.users.base_path, user) ] | def chk_acls_cmd(user): return [ 'getfacl', '-R', '%s/%s' % ( configuration.users.base_path, user) ] | 477,806 |
def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | 477,807 |
def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | 477,808 |
def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | 477,809 |
def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '... | 477,810 |
def load_users(self, groups = None): """ Load user accounts from /etc/{passwd,shadow} """ users = {} login_cache = {} | def load_users(self, groups = None): """ Load user accounts from /etc/{passwd,shadow} """ users = {} login_cache = {} | 477,811 |
def load_users(self, groups = None): """ Load user accounts from /etc/{passwd,shadow} """ users = {} login_cache = {} | def load_users(self, groups = None): """ Load user accounts from /etc/{passwd,shadow} """ users = {} login_cache = {} | 477,812 |
def save_users(self): """ Write /etc/passwd and /etc/shadow """ | def save_users(self): """ Write /etc/passwd and /etc/shadow """ | 477,813 |
def save_users(self): """ Write /etc/passwd and /etc/shadow """ | def save_users(self): """ Write /etc/passwd and /etc/shadow """ | 477,814 |
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | 477,815 |
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | 477,816 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | 477,817 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | 477,818 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | 477,819 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | 477,820 |
def chk_acls_cmds(dir): return [ 'sudo', 'getfacl', '-R', dir ] | def chk_acls_cmds(dir): return [ 'sudo', 'getfacl', '-R', dir ] | 477,821 |
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 477,822 |
def __getitem__(self, key): try: return dict.__getitem__(self, key) except KeyError: return self.default | def __getitem__(self, key): try: return dict.__getitem__(self, key) except KeyError: return self.default | 477,823 |
def __getitem__(self, key): try: return dict.__getitem__(self, key) except KeyError: return self.default | def __getitem__(self, key): try: return dict.__getitem__(self, key) except KeyError: return self.default | 477,824 |
def delete_keyword(): """ delete a system wide User profile. """ from licorn.system import keywords kw = keywords.KeywordsController(configuration) kw.DeleteKeyword(opts.name, opts.del_children) | def delete_keyword(): """ delete a system wide User profile. """ from licorn.core import keywords keywords.DeleteKeyword(opts.name, opts.del_children) | 477,825 |
def bind(self, need_write_access=True): """ Bind as admin or user, when LDAP needs a stronger authentication.""" ltrace('ldap','binding as %s.' % ( styles.stylize(styles.ST_LOGIN, self.bind_dn))) | def bind(self, need_write_access=True): """ Bind as admin or user, when LDAP needs a stronger authentication.""" ltrace('ldap','binding as %s.' % ( styles.stylize(styles.ST_LOGIN, self.bind_dn))) | 477,826 |
def __init__(self, input_name): LDIFParser.__init__(self, open('%s/schemas/%s.ldif' % ( os.path.dirname(__file__),input_name), 'r')) | def __init__(self, input_name): LDIFParser.__init__(self, open('%s/schemas/%s.ldif' % ( os.path.dirname(__file__),input_name), 'r')) | 477,827 |
def WriteConf(self): """ Write the keywords data in appropriate system files.""" logging.progress('%s: saving data structures to disk.' % \ self.pretty_name) | def WriteConf(self): """ Write the keywords data in appropriate system files.""" logging.progress('%s: saving data structures to disk.' % \ self.pretty_name) | 477,828 |
def AddKeyword(self, name = None, parent = "", description = ""): """ Add a new keyword on the system, provided some checks are OK. """ if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | def AddKeyword(self, name = None, parent = "", description = ""): """ Add a new keyword on the system, provided some checks are OK. """ if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | 477,829 |
def DeleteKeyword(self, name=None, del_children=False, modify_file=True): """ """ if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | def DeleteKeyword(self, name=None, del_children=False, modify_file=True): """ Delete a keyword """ Delete a keyword if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | 477,830 |
def DeleteKeyword(self, name=None, del_children=False, modify_file=True): """ """ if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | def DeleteKeyword(self, name=None, del_children=False, modify_file=True): """ """ if name is None: raise exceptions.BadArgumentError(logging.SYSK_SPECIFY_KEYWORD) | 477,831 |
def ChangeParent(self, name, parent): """ Change keyword's parent """ try: self.keywords[parent] self.keywords[name]["parent"] = parent except KeyError, e: raise exceptions.BadArgumentError("The keyword %s doesn't exist on this system." % str(e)) self.WriteConf() | def ChangeParent(self, name, parent): """ Change keyword's parent """ try: self.keywords[parent] self.keywords[name]["parent"] = parent except KeyError, e: raise exceptions.BadArgumentError("The keyword %s doesn't exist on this system." % str(e)) self.WriteConf() | 477,832 |
def RemoveParent(self, name): """ Remove parent of the keyword 'name' """ try: self.keywords[name]["parent"] = "" except KeyError, e: raise exceptions.BadArgumentError("The keyword you specified doesn't exist on this system.") self.WriteConf() | def RemoveParent(self, name): """ Remove parent of the keyword 'name' """ try: self.keywords[name]["parent"] = "" except KeyError, e: raise exceptions.BadArgumentError("The keyword you specified doesn't exist on this system.") self.WriteConf() | 477,833 |
def ChangeDescription(self, name, description): """ Change the description of a keyword """ try: self.keywords[name]["description"] = description except KeyError, e: raise exceptions.BadArgumentError("The keyword you specified doesn't exist on this system.") self.WriteConf() | def ChangeDescription(self, name, description): """ Change the description of a keyword """ try: self.keywords[name]["description"] = description except KeyError, e: raise exceptions.BadArgumentError("The keyword you specified doesn't exist on this system.") self.WriteConf() | 477,834 |
def mod_user(self, opts, args): """ Modify a POSIX user account (Samba / LDAP included). """ | def mod_user(self, opts, args): """ Modify a POSIX user account (Samba / LDAP included). """ | 477,835 |
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name if protected_group(name, complete=False): return w.forgery_error(title) data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[gro... | def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name if protected_group(name, complete=False): return w.forgery_error(title) data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[gro... | 477,836 |
def refork_as_root_or_die(process_title='licorn-generic', prefunc=None): """ check if current user is root. if not, check if he/she is member of group "admins" and then refork ourselves with sudo, to gain root privileges, needed for Licorn® daemon. Do it with traditionnal syscalls, because the rest of Licorn® is not in... | def refork_as_root_or_die(process_title='licorn-generic', prefunc=None, group='admins'): """ check if current user is root. if not, check if he/she is member of group "admins" and then refork ourselves with sudo, to gain root privileges, needed for Licorn® daemon. Do it with traditionnal syscalls, because the rest of L... | 477,837 |
def refork_as_root_or_die(process_title='licorn-generic', prefunc=None): """ check if current user is root. if not, check if he/she is member of group "admins" and then refork ourselves with sudo, to gain root privileges, needed for Licorn® daemon. Do it with traditionnal syscalls, because the rest of Licorn® is not in... | def refork_as_root_or_die(process_title='licorn-generic', prefunc=None): """ check if current user is root. if not, check if he/she is member of group "admins" and then refork ourselves with sudo, to gain root privileges, needed for Licorn® daemon. Do it with traditionnal syscalls, because the rest of Licorn® is not in... | 477,838 |
def AddUsersInGroup(self, name=None, gid=None, users_to_add=None, batch=False, listener=None): """ Add a user list in the group 'name'. """ | def AddUsersInGroup(self, name=None, gid=None, users_to_add=None, batch=False, listener=None): """ Add a user list in the group 'name'. """ | 477,839 |
def AddGroup(self, name, gid=None, description="", skel="", system=False, permissive=False, batch=False): """ Add an Licorn group (the group + the responsible group + the shared dir + permissions). """ | def AddGroup(self, name, gid=None, description="", skel="", system=False, permissive=False, batch=False): """ Add an Licorn group (the group + the responsible group + the shared dir + permissions). """ | 477,840 |
def AddGroup(self, name, gid=None, description="", skel="", system=False, permissive=False, batch=False): """ Add an Licorn group (the group + the responsible group + the shared dir + permissions). """ | def AddGroup(self, name, gid=None, description="", skel="", system=False, permissive=False, batch=False): """ Add an Licorn group (the group + the responsible group + the shared dir + permissions). """ | 477,841 |
def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value | def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value | 477,842 |
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """ | def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """ | 477,843 |
def ctxtnav(active = True): if active: disabled = ''; onClick = ''; else: disabled = 'un-clickable'; onClick = 'onClick="javascript: return(false);"' return ''' <div id="ctxtnav" class="nav"> <h2>Context Navigation</h2> <ul> <li><a href="/groups/new" title="%s" %s class="%s"><div class="ctxt-icon %s" id="icon-add">%... | def ctxtnav(active = True): if active: disabled = ''; onClick = ''; else: disabled = 'un-clickable'; onClick = 'onClick="javascript: return(false);"' return ''' <div id="ctxtnav" class="nav"> <h2>Context Navigation</h2> <ul> <li><a href="/groups/new" title="%s" %s class="%s"><div class="ctxt-icon %s" id="icon-add">%... | 477,844 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and will... | 477,845 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | 477,846 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | 477,847 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | 477,848 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | 477,849 |
def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | def unlock(uri, http_user, name, sure = False): """ Make a shared group dir permissive. """ title = _("Make group %s permissive") % name data = '%s\n%s\n%s' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will permit large access to files and folders in the group shared dir, and ... | 477,850 |
def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. Only th... | 477,851 |
def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | 477,852 |
def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | 477,853 |
def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | def lock(uri, http_user, name, sure = False): """ Make a group not permissive. """ title = _("Make group %s not permissive") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) if not sure: description = _('''This will ensure finer write access to files and folders in the group shared dir. O... | 477,854 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) groups.reload() if groups.is_system_group(name): return w.page(titl... | 477,855 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | 477,856 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | 477,857 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | 477,858 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | 477,859 |
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.pag... | 477,860 |
def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) ... | 477,861 |
def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | 477,862 |
def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | 477,863 |
def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | def skel(req, name, sure = False, apply_skel = configuration.users.default_skel): """ TO BE IMPLEMENTED ! reapply a user's skel with confirmation.""" users.reload() profiles.reload() groups.reload() title = _("Skeleton reapplying for group %s") % name data = '%s%s' % (w.backto(), __groups_actions(title)) if not sur... | 477,864 |
def filter_skels(pri_group, sk_list): ''' TODO: to be converted to licorn model if pri_group == configuration.mNames['RESPONSABLES_GROUP']: return filter(lambda x: x.rfind("/%s/" % configuration.mNames['RESPONSABLES_GROUP']) != -1, sk_list) elif pri_group == configuration.mNames['USAGERS_GROUP']: return filter(lambda x... | def filter_skels(pri_group, sk_list): ''' TODO: to be converted to licorn model if pri_group == configuration.mNames['RESPONSABLES_GROUP']: return filter(lambda x: x.rfind("/%s/" % configuration.mNames['RESPONSABLES_GROUP']) != -1, sk_list) elif pri_group == configuration.mNames['USAGERS_GROUP']: return filter(lambda x... | 477,865 |
def filter_skels(pri_group, sk_list): ''' TODO: to be converted to licorn model if pri_group == configuration.mNames['RESPONSABLES_GROUP']: return filter(lambda x: x.rfind("/%s/" % configuration.mNames['RESPONSABLES_GROUP']) != -1, sk_list) elif pri_group == configuration.mNames['USAGERS_GROUP']: return filter(lambda x... | def filter_skels(pri_group, sk_list): ''' TODO: to be converted to licorn model if pri_group == configuration.mNames['RESPONSABLES_GROUP']: return filter(lambda x: x.rfind("/%s/" % configuration.mNames['RESPONSABLES_GROUP']) != -1, sk_list) elif pri_group == configuration.mNames['USAGERS_GROUP']: return filter(lambda x... | 477,866 |
def new(uri, http_user): """Generate a form to create a new group on the system.""" title = _("Creating a new group") data = w.page_body_start(uri, http_user, ctxtnav, title, False) form_name = "group_create_form" data += '''<div id="edit_form"> | def new(uri, http_user): """Generate a form to create a new group on the system.""" title = _("Creating a new group") data = w.page_body_start(uri, http_user, ctxtnav, title, False) form_name = "group_create_form" data += '''<div id="edit_form"> | 477,867 |
def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | 477,868 |
def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | 477,869 |
def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | 477,870 |
def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | def create(uri, http_user, name, description = None, skel = "", permissive = False, create = None): title = _("Creating group %s") % name data = '%s<h1>%s</h1><br />' % (w.backto(), title) del create command = [ 'sudo', 'add', 'group', '--quiet', '--no-colors', '--name', name, '--skel', skel ] if descrip... | 477,871 |
def view(uri, http_user, name): """Prepare a group view to be printed.""" users.reload() groups.reload() title = _("Showing details of group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) u = users.users g = groups.groups # TODO: should we forbid system group view ? why not ? # A... | def view(uri, http_user, name): """Prepare a group view to be printed.""" users.reload() groups.reload() title = _("Showing details of group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) u = users.users g = groups.groups # TODO: should we forbid system group view ? why not ? # A... | 477,872 |
def view(uri, http_user, name): """Prepare a group view to be printed.""" users.reload() groups.reload() title = _("Showing details of group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) u = users.users g = groups.groups # TODO: should we forbid system group view ? why not ? # A... | def view(uri, http_user, name): """Prepare a group view to be printed.""" users.reload() groups.reload() title = _("Showing details of group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) u = users.users g = groups.groups # TODO: should we forbid system group view ? why not ? # A... | 477,873 |
def user_line(login): uid = users.login_to_uid(login) return '''<tr><td>%s</td><td>%s</td><td>%s</td></tr>''' % (u[uid]['gecos'], login, uid) | def user_line(login): uid = users.login_to_uid(login) return '''<tr><td>%s</td><td>%s</td><td>%s</td></tr>''' % (u[uid]['gecos'], login, uid) | 477,874 |
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | 477,875 |
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | 477,876 |
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | 477,877 |
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ... | 477,878 |
def permissive(perm, sys): | def permissive(perm, sys): | 477,879 |
def permissive(perm, sys): | def permissive(perm, sys): | 477,880 |
def permissive(perm, sys): | def permissive(perm, sys): | 477,881 |
def record(uri, http_user, name, skel = None, permissive = False, description = None, members_source = [], members_dest = [], resps_source = [], resps_dest = [], guests_source = [], guests_dest = [], record = None): """Record group changes.""" # forget about it, this is a scoria from the POST FORM to va... | def record(uri, http_user, name, skel = None, permissive = False, description = None, members_source = [], members_dest = [], resps_source = [], resps_dest = [], guests_source = [], guests_dest = [], record = None): """Record group changes.""" # forget about it, this is a scoria from the POST FORM to va... | 477,882 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,883 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,884 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,885 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,886 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,887 |
def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | def main(uri, http_user, sort = "name", order = "asc"): start = time.time() users.reload() groups.reload() #reload(p) g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = "%s" % configuration.groups.names['_plural'] data = w.page_body_start(uri, http_user, ctxtnav, title) if... | 477,888 |
def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | 477,889 |
def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | 477,890 |
def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | 477,891 |
def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = ''' | 477,892 |
def CleanUp(self): """This is a sort of destructor. Clean-up before being deleted...""" | def CleanUp(self): """This is a sort of destructor. Clean-up before being deleted...""" | 477,893 |
def check_uid(uid, minimal=minimal, batch=batch, auto_answer=auto_answer): | def check_uid(uid, minimal=minimal, batch=batch, auto_answer=auto_answer): | 477,894 |
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | 477,895 |
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te... | 477,896 |
def mod_user(opts, args): """ Modify a POSIX user account (Samba / LDAP included). """ configuration = LicornConfiguration() users = UsersController(configuration) uids_to_mod = cli_select(users, 'user', args, [ (opts.login, users.login_to_uid), (opts.uid, users.confirm_uid) ]) ltrace('mod', '> mod_user(%s)' % uids_... | def mod_user(opts, args): """ Modify a POSIX user account (Samba / LDAP included). """ configuration = LicornConfiguration() users = UsersController(configuration) uids_to_mod = cli_select(users, 'user', args, [ (opts.login, users.login_to_uid), (opts.uid, users.confirm_uid) ]) ltrace('mod', '> mod_user(%s)' % uids_... | 477,897 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | 477,898 |
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ] | def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '').Run() ] | 477,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.