introduces new param --onlyusers for ldap sync
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 13 Jun 2014 19:38:12 +0000 (21:38 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 16 Jul 2014 11:00:05 +0000 (13:00 +0200)
... to skip syncing of groups via CLI

Change-Id: I0a176de919bd47ddc1e4926e204c48a0a83c419f
Reviewed-on: http://gerrit.tine20.com/customers/768
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Lars Kneschke <l.kneschke@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Setup/Frontend/Cli.php
tine20/Setup/Server/Cli.php

index 18c4821..dd98feb 100644 (file)
@@ -297,7 +297,9 @@ class Setup_Frontend_Cli
         Setup_Core::setExecutionLifeTime(0);
         
         // import groups
-        Tinebase_Group::syncGroups();
+        if (! $_opts->onlyusers) {
+            Tinebase_Group::syncGroups();
+        }
         
         // import users
         $options = array('syncContactData' => TRUE);
index 6dbeb44..c02f455 100644 (file)
@@ -46,13 +46,12 @@ class Setup_Server_Cli implements Tinebase_Server_Interface
                 'uninstall-s'               => 'Uninstall application [All] or comma separated list',
                 'list-s'                    => 'List installed applications',
                 'sync_accounts_from_ldap'   => 'Import user and groups from ldap',
-                'dbmailldap'                => 'Only usable with sync_accounts_from_ldap. Fetches dbmail email user data from LDAP.',
+                    'dbmailldap'            => 'Only usable with sync_accounts_from_ldap. Fetches dbmail email user data from LDAP.',
+                    'onlyusers'             => 'Only usable with sync_accounts_from_ldap. Fetches only users and no groups from LDAP.',
                 'sync_passwords_from_ldap'  => 'Synchronize user passwords from ldap',
                 'egw14import'               => 'Import user and groups from egw14
                          Examples: 
                           setup.php --egw14import /path/to/config.ini'
-                #'username'             => 'Username [required]',
-                #'password'             => 'Password [required]',
             ));
             $opts->parse();
         } catch (Zend_Console_Getopt_Exception $e) {