From 0343af4270d260018ab6428dd07e8d2d25b93940 Mon Sep 17 00:00:00 2001 From: kakwa Date: Thu, 28 May 2015 09:44:21 +0200 Subject: [PATCH] correct backend module skeleton --- ldapcherry/backend/__init__.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/ldapcherry/backend/__init__.py b/ldapcherry/backend/__init__.py index e1d56ed..ee3e9fc 100644 --- a/ldapcherry/backend/__init__.py +++ b/ldapcherry/backend/__init__.py @@ -12,18 +12,33 @@ class Backend: def __init__(self): pass - def auth(self): + def auth(self, username, password): + return False + + def add_user(self, attrs): pass - def add_to_group(self): + def del_user(self, username): pass - def set_attr(self): + def set_attrs(self, attrs, username): pass - def rm_from_group(self): + def add_to_group(self, username): pass + def rm_from_group(self, username): + pass + + def search(self, searchstring): + return [] + + def get_user(self, username): + return None + + def get_groups(self, username): + return [] + def get_param(self, param, default=None): if param in self.config: return self.config[param]