From: Frank Brehm Date: Thu, 11 Jan 2018 15:14:26 +0000 (+0100) Subject: Adding contructor to pp_lib/dnsui_users.py X-Git-Tag: 0.1.2~58 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=1b5bcf8a9d551f36a212ef87352cff1759b3f70b;p=pixelpark%2Fadmin-tools.git Adding contructor to pp_lib/dnsui_users.py --- diff --git a/pp_lib/dnsui_users.py b/pp_lib/dnsui_users.py index 61ee965..2d81536 100644 --- a/pp_lib/dnsui_users.py +++ b/pp_lib/dnsui_users.py @@ -23,7 +23,7 @@ from .common import pp from .ldap_app import PpLdapAppError, PpLdapApplication -__version__ = '0.1.0' +__version__ = '0.1.1' LOG = logging.getLogger(__name__) @@ -39,7 +39,27 @@ class DnsuiUsersApp(PpLdapApplication): are existing and have administrator access. """ + default_admin_group = "cn=Administratoren Pixelpark Berlin,ou=Groups,o=Pixelpark,o=isp" + # ------------------------------------------------------------------------- + def __init__(self, appname=None, version=__version__): + + self.admin_users = [] + self.admin_group = self.default_admin_group + + self._show_simulate_opt = True + + description = textwrap.dedent('''\ + Checking existence of all LDAP users in DNSUI database in LDAP, otherwise + deactivating them. Checking, that all members of the defined admin group + in LDAP are existing in DB and are enabled administrators. + ''').strip() + + super(DnsuiUsersApp, self).__init__( + appname=appname, version=version, description=description) + + self.initialized = True + # =============================================================================