diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-04 02:41:06 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-04 02:41:06 -0700 |
commit | c38638fdf4ccaa04dc33b2975b5e4832ef04b703 (patch) | |
tree | c9a36e25ea5de5c098263cfbef95c7705df76470 /apps/user_ldap/appinfo | |
parent | 5b7f76e7022f6d3c5cb4038a737df3870e56773b (diff) | |
parent | 3e1bdd8a041886319daea4ad7867d1994724b311 (diff) | |
download | nextcloud-server-c38638fdf4ccaa04dc33b2975b5e4832ef04b703.tar.gz nextcloud-server-c38638fdf4ccaa04dc33b2975b5e4832ef04b703.zip |
Merge pull request #4815 from owncloud/ldap_improve_testing
LDAP modularization and tests
Diffstat (limited to 'apps/user_ldap/appinfo')
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 593e846bc03..9d6327181af 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -24,15 +24,15 @@ OCP\App::registerAdmin('user_ldap', 'settings'); $configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true); +$ldapWrapper = new OCA\user_ldap\lib\LDAP(); if(count($configPrefixes) === 1) { - $connector = new OCA\user_ldap\lib\Connection($configPrefixes[0]); - $userBackend = new OCA\user_ldap\USER_LDAP(); - $userBackend->setConnector($connector); - $groupBackend = new OCA\user_ldap\GROUP_LDAP(); - $groupBackend->setConnector($connector); + $connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]); + $ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper); + $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess); + $groupBackend = new OCA\user_ldap\GROUP_LDAP($ldapAccess); } else { - $userBackend = new OCA\user_ldap\User_Proxy($configPrefixes); - $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes); + $userBackend = new OCA\user_ldap\User_Proxy($configPrefixes, $ldapWrapper); + $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); } if(count($configPrefixes) > 0) { |