2014-06-03 14:35:18 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2015-03-26 13:44:34 +03:00
|
|
|
* @author Arthur Schiwon <blizzz@owncloud.com>
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
2014-06-03 14:35:18 +04:00
|
|
|
*/
|
2015-02-26 13:37:37 +03:00
|
|
|
|
2014-08-21 19:59:13 +04:00
|
|
|
use OCA\user_ldap\lib\Helper;
|
|
|
|
use OCA\user_ldap\lib\LDAP;
|
|
|
|
use OCA\user_ldap\User_Proxy;
|
2014-12-20 18:09:04 +03:00
|
|
|
use OCA\User_LDAP\Mapping\UserMapping;
|
2014-12-20 19:08:26 +03:00
|
|
|
use OCA\User_LDAP\lib\User\DeletedUsersIndex;
|
|
|
|
|
|
|
|
$dbConnection = \OC::$server->getDatabaseConnection();
|
|
|
|
$userMapping = new UserMapping($dbConnection);
|
|
|
|
$helper = new Helper();
|
2015-01-07 01:28:49 +03:00
|
|
|
$ocConfig = \OC::$server->getConfig();
|
2014-12-20 19:08:26 +03:00
|
|
|
$uBackend = new User_Proxy(
|
|
|
|
$helper->getServerConfigurationPrefixes(true),
|
2015-01-07 01:28:49 +03:00
|
|
|
new LDAP(),
|
|
|
|
$ocConfig
|
2014-12-20 19:08:26 +03:00
|
|
|
);
|
|
|
|
$deletedUsersIndex = new DeletedUsersIndex(
|
2015-01-07 01:28:49 +03:00
|
|
|
$ocConfig, $dbConnection, $userMapping
|
2015-01-06 19:50:06 +03:00
|
|
|
);
|
2014-08-21 19:59:13 +04:00
|
|
|
|
2015-03-23 17:17:14 +03:00
|
|
|
$application->add(new OCA\user_ldap\Command\ShowConfig($helper));
|
2014-06-03 21:10:18 +04:00
|
|
|
$application->add(new OCA\user_ldap\Command\SetConfig());
|
|
|
|
$application->add(new OCA\user_ldap\Command\TestConfig());
|
2015-03-23 17:17:14 +03:00
|
|
|
$application->add(new OCA\user_ldap\Command\CreateEmptyConfig($helper));
|
|
|
|
$application->add(new OCA\user_ldap\Command\DeleteConfig($helper));
|
2015-01-07 01:28:49 +03:00
|
|
|
$application->add(new OCA\user_ldap\Command\Search($ocConfig));
|
2015-01-07 01:40:00 +03:00
|
|
|
$application->add(new OCA\user_ldap\Command\ShowRemnants(
|
|
|
|
$deletedUsersIndex, \OC::$server->getDateTimeFormatter())
|
|
|
|
);
|
2014-08-21 19:59:13 +04:00
|
|
|
$application->add(new OCA\user_ldap\Command\CheckUser(
|
2015-01-06 19:50:06 +03:00
|
|
|
$uBackend, $helper, $deletedUsersIndex, $userMapping)
|
|
|
|
);
|