From 8617ed5ae5ef5eb5a97546b00ae4ce256ba3f37b Mon Sep 17 00:00:00 2001 From: kakwa Date: Tue, 21 Jul 2015 00:53:07 +0200 Subject: [PATCH] fix docstring in ldapcherry/backend/__init__.py --- ldapcherry/backend/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ldapcherry/backend/__init__.py b/ldapcherry/backend/__init__.py index 5634ede..77a6ed1 100644 --- a/ldapcherry/backend/__init__.py +++ b/ldapcherry/backend/__init__.py @@ -12,6 +12,7 @@ class Backend: def __init__(self, config, logger, name, attrslist, key): """ Initialize the backend + :param config: the configuration of the backend :type config: dict {'config key': 'value'} :param logger: the cherrypy error logger object @@ -27,6 +28,7 @@ class Backend: def auth(self, username, password): """ Check authentication against the backend + :param username: 'key' attribute of the user :type username: string :param password: password of the user @@ -37,20 +39,26 @@ class Backend: def add_user(self, attrs): """ Add a user to the backend + :param attrs: attributes of the user :type attrs: dict ({: }) + + .. warning:: raise UserAlreadyExists if user already exists """ pass def del_user(self, username): """ Delete a user from the backend + :param username: 'key' attribute of the user :type username: string + """ pass def set_attrs(self, username, attrs): """ Set a list of attributes for a given user + :param username: 'key' attribute of the user :type username: string :param attrs: attributes of the user @@ -60,6 +68,7 @@ class Backend: def add_to_groups(self, username, groups): """ Add a user to a list of groups + :param username: 'key' attribute of the user :type username: string :param groups: list of groups @@ -69,15 +78,19 @@ class Backend: def del_from_groups(self, username, groups): """ Delete a user from a list of groups + :param username: 'key' attribute of the user :type username: string :param groups: list of groups :type groups: list of strings + + .. warning:: raise GroupDoesntExist if group doesn't exist """ pass def search(self, searchstring): """ Search backend for users + :param searchstring: the search string :type searchstring: string :rtype: dict of dict ( {: {: }} ) @@ -86,14 +99,18 @@ class Backend: def get_user(self, username): """ Get a user's attributes + :param username: 'key' attribute of the user :type username: string :rtype: dict ( {: } ) + + .. warning:: raise UserDoesntExist if user doesn't exist """ return {} def get_groups(self, username): """ Get a user's groups + :param username: 'key' attribute of the user :type username: string :rtype: list of groups