Commit c0a78d39 authored by Antoine Millet's avatar Antoine Millet
Browse files

Renamed account management methods on client handler. Added tags method.

parent a5bc3fa2
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ class ClientHandler(OnlineCCHandler):

    @pure
    @listed
    def account_setpassword(self, login, password, method='ssha'):
    def passwd(self, login, password, method='ssha'):
        '''
        Define a new password for specified user.
        '''
@@ -120,7 +120,7 @@ class ClientHandler(OnlineCCHandler):

    @pure
    @listed
    def account_create(self, login, password, role):
    def adduser(self, login, password, role):
        '''
        Create a new account with specified login.
        '''
@@ -128,15 +128,15 @@ class ClientHandler(OnlineCCHandler):

    @pure
    @listed
    def account_addtag(self, login, tag):
    def addtag(self, login, tag_name, tag_value):
        '''
        Add a tag to the account with specified login.
        '''
        self._server.conf.add_tag(login, tag)
        self._server.conf.add_tag(login, tag_name, tag_value)

    @pure
    @listed
    def account_removetag(self, login, tag):
    def deltag(self, login, tag):
        '''
        Remove a tag of the account with specified login.
        '''
@@ -144,7 +144,15 @@ class ClientHandler(OnlineCCHandler):

    @pure
    @listed
    def account_delete(self, login):
    def tags(self, login):
        '''
        Return all static tags attached to the specified login.
        '''
        return self._server.conf.show(login)['tags']

    @pure
    @listed
    def deluser(self, login):
        '''
        Delete the account with specified login.
        '''