Commit 233f0374 authored by Antoine Millet's avatar Antoine Millet

Added account management methods to the client handler.

parent 23981a6a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment