2014-06-03 14:35:18 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2016-07-21 17:49:16 +03:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
|
|
|
*
|
2016-05-26 20:56:05 +03:00
|
|
|
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
|
2016-07-21 17:49:16 +03:00
|
|
|
* @author Joas Schilling <coding@schilljs.com>
|
2015-03-26 13:44:34 +03:00
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
*
|
|
|
|
* @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
|
|
|
|
2016-05-12 17:28:21 +03:00
|
|
|
use OCA\User_LDAP\Helper;
|
2016-05-12 17:21:28 +03:00
|
|
|
use OCA\User_LDAP\LDAP;
|
2016-05-12 12:01:29 +03:00
|
|
|
use OCA\User_LDAP\User_Proxy;
|
2014-12-20 18:09:04 +03:00
|
|
|
use OCA\User_LDAP\Mapping\UserMapping;
|
2016-05-12 12:25:50 +03:00
|
|
|
use OCA\User_LDAP\User\DeletedUsersIndex;
|
2014-12-20 19:08:26 +03:00
|
|
|
|
|
|
|
$dbConnection = \OC::$server->getDatabaseConnection();
|
|
|
|
$userMapping = new UserMapping($dbConnection);
|
2016-10-10 11:18:18 +03:00
|
|
|
$helper = new Helper(\OC::$server->getConfig());
|
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(),
|
2017-03-31 10:16:22 +03:00
|
|
|
$ocConfig,
|
|
|
|
\OC::$server->getNotificationManager()
|
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
|
|
|
|
2016-05-12 10:59:29 +03:00
|
|
|
$application->add(new OCA\User_LDAP\Command\ShowConfig($helper));
|
|
|
|
$application->add(new OCA\User_LDAP\Command\SetConfig());
|
|
|
|
$application->add(new OCA\User_LDAP\Command\TestConfig());
|
|
|
|
$application->add(new OCA\User_LDAP\Command\CreateEmptyConfig($helper));
|
|
|
|
$application->add(new OCA\User_LDAP\Command\DeleteConfig($helper));
|
|
|
|
$application->add(new OCA\User_LDAP\Command\Search($ocConfig));
|
|
|
|
$application->add(new OCA\User_LDAP\Command\ShowRemnants(
|
2015-01-07 01:40:00 +03:00
|
|
|
$deletedUsersIndex, \OC::$server->getDateTimeFormatter())
|
|
|
|
);
|
2016-05-12 10:59:29 +03:00
|
|
|
$application->add(new OCA\User_LDAP\Command\CheckUser(
|
2015-01-06 19:50:06 +03:00
|
|
|
$uBackend, $helper, $deletedUsersIndex, $userMapping)
|
|
|
|
);
|