Loading ccserver/conf.py +19 −0 Original line number Diff line number Diff line Loading @@ -325,6 +325,25 @@ class CCConf(object): conf['password'] = self._hash_password(password) self._set_conf(login, conf, create=True) @writer def copy_account(self, copy_login, login, password): ''' Create a new account based on another. :param copy_login: the login of the account to copy. :param password: password of the new user :param role: the role of the new user :raise CCConf.AlreadyExistingAccount: if the login is already :raise CCConf.UnknownAccount: if the copy login doesn't exist ''' conf_copy = self._get_conf(copy_login) self.create_account(login, conf_copy['role'], password) password = self._get_conf(login)['password'] conf_copy['password'] = password self._set_conf(login, conf_copy) @writer def add_right(self, login, tql, method=None, target='allow', index=None): ''' Loading Loading
ccserver/conf.py +19 −0 Original line number Diff line number Diff line Loading @@ -325,6 +325,25 @@ class CCConf(object): conf['password'] = self._hash_password(password) self._set_conf(login, conf, create=True) @writer def copy_account(self, copy_login, login, password): ''' Create a new account based on another. :param copy_login: the login of the account to copy. :param password: password of the new user :param role: the role of the new user :raise CCConf.AlreadyExistingAccount: if the login is already :raise CCConf.UnknownAccount: if the copy login doesn't exist ''' conf_copy = self._get_conf(copy_login) self.create_account(login, conf_copy['role'], password) password = self._get_conf(login)['password'] conf_copy['password'] = password self._set_conf(login, conf_copy) @writer def add_right(self, login, tql, method=None, target='allow', index=None): ''' Loading