]> Frank Brehm's Git Trees - pixelpark/admin-tools.git/commitdiff
Adding contructor to pp_lib/dnsui_users.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 11 Jan 2018 15:14:26 +0000 (16:14 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 11 Jan 2018 15:14:26 +0000 (16:14 +0100)
pp_lib/dnsui_users.py

index 61ee9659d55cf85f9ac5170d8652fe092ea3f3f3..2d815365cb665657c68ea0f62901b6e5d2c088ea 100644 (file)
@@ -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
+
 
 
 # =============================================================================