mirror of
https://github.com/kakwa/ldapcherry
synced 2024-06-06 02:57:47 +02:00
93ed190913
* change parameters name for Backend Ldap * fix default value handling in backends get_param * correct exception in backends get_param * fix syntaxe error * add backend name in test_BackendLdap.py
35 lines
689 B
Python
35 lines
689 B
Python
# -*- coding: utf-8 -*-
|
|
# vim:set expandtab tabstop=4 shiftwidth=4:
|
|
#
|
|
# The MIT License (MIT)
|
|
# LdapCherry
|
|
# Copyright (c) 2014 Carpentier Pierre-Francois
|
|
|
|
from ldapcherry.exceptions import MissingParameter
|
|
|
|
class Backend:
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
def auth(self):
|
|
pass
|
|
|
|
def add_to_group(self):
|
|
pass
|
|
|
|
def set_attr(self):
|
|
pass
|
|
|
|
def rm_from_group(self):
|
|
pass
|
|
|
|
def get_param(self, param, default=None):
|
|
if param in self.config:
|
|
return self.config[param]
|
|
elif not default is None:
|
|
return default
|
|
else:
|
|
raise MissingParameter('backends', self.backend_name+'.'+param)
|
|
|