diff --git a/ccserver/handlers.py b/ccserver/handlers.py index f284f5652e8c38d30479415f191e3b3c570ff7f8..b6203d49cbc0c327014d8ec13cc3b20979b6149b 100644 --- a/ccserver/handlers.py +++ b/ccserver/handlers.py @@ -170,7 +170,43 @@ class ClientHandler(OnlineCCHandler): @pure @listed + def account_setpassword(self, login, password, method='ssha'): + ''' + Define a new password for specified user. + ''' + self._server.conf.set_password(login, password, method) + @pure + @listed + def account_create(self, login, password, role): + ''' + Create a new account with specified login. + ''' + self._server.conf.create_account(login, password, role) + + @pure + @listed + def account_addtag(self, login, tag): + ''' + Add a tag to the account with specified login. + ''' + self._server.conf.add_tag(login, tag) + + @pure + @listed + def account_removetag(self, login, tag): + ''' + Remove a tag of the account with specified login. + ''' + self._server.conf.remove_tag(login, tag) + + @pure + @listed + def account_delete(self, login): + ''' + Delete the account with specified login. + ''' + self._server.conf.remove_account(login) class AuthenticationError(Exception): pass