diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-25 17:36:19 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-08-29 11:14:16 +0200 |
commit | 441c600c906a2ec55bdab123840be5d1d63bb679 (patch) | |
tree | d6880aa4c343d010e340761a0ba453de1eff06b9 /apps/user_ldap/ajax | |
parent | baa49cd58a670ca7fdd9211cf057b2257d86eff9 (diff) | |
download | nextcloud-server-441c600c906a2ec55bdab123840be5d1d63bb679.tar.gz nextcloud-server-441c600c906a2ec55bdab123840be5d1d63bb679.zip |
remove Access as hard dependency, inject it instead
Diffstat (limited to 'apps/user_ldap/ajax')
-rw-r--r-- | apps/user_ldap/ajax/wizard.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index ad75a384369..d5759c597a2 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -39,9 +39,24 @@ if(!isset($_POST['ldap_serverconfig_chooser'])) { } $prefix = $_POST['ldap_serverconfig_chooser']; -$ldapWrapper = new OCA\user_ldap\lib\LDAP(); +$ldapWrapper = new \OCA\user_ldap\lib\LDAP(); $configuration = new \OCA\user_ldap\lib\Configuration($prefix); -$wizard = new \OCA\user_ldap\lib\Wizard($configuration, $ldapWrapper); + +$con = new \OCA\user_ldap\lib\Connection($ldapWrapper, '', null); +$con->setConfiguration($configuration->getConfiguration()); +$con->ldapConfigurationActive = true; +$con->setIgnoreValidation(true); + +$userManager = new \OCA\user_ldap\lib\user\Manager( + \OC::$server->getConfig(), + new \OCA\user_ldap\lib\FilesystemHelper(), + new \OCA\user_ldap\lib\LogWrapper(), + \OC::$server->getAvatarManager(), + new \OCP\Image()); + +$access = new \OCA\user_ldap\lib\Access($con, $ldapWrapper, $userManager); + +$wizard = new \OCA\user_ldap\lib\Wizard($configuration, $ldapWrapper, $access); switch($action) { case 'guessPortAndTLS': |