diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-06 23:28:49 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-06 23:28:49 +0100 |
commit | 40ecd30fba6d29362c455b1f0eef875ff19cd544 (patch) | |
tree | c221a9cec19d42588338c308333fc84ef3d84e91 /apps/user_ldap/appinfo | |
parent | 8e488f726c6f6aaaf1b33c6bc53f7ecb417b0d28 (diff) | |
download | nextcloud-server-40ecd30fba6d29362c455b1f0eef875ff19cd544.tar.gz nextcloud-server-40ecd30fba6d29362c455b1f0eef875ff19cd544.zip |
inject oc config to User_LDAP
Diffstat (limited to 'apps/user_ldap/appinfo')
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 8 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/register_command.php | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 302575c3682..980477bb273 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -27,8 +27,8 @@ OCP\App::registerAdmin('user_ldap', 'settings'); $helper = new \OCA\user_ldap\lib\Helper(); $configPrefixes = $helper->getServerConfigurationPrefixes(true); $ldapWrapper = new OCA\user_ldap\lib\LDAP(); +$ocConfig = \OC::$server->getConfig(); if(count($configPrefixes) === 1) { - $ocConfig = \OC::$server->getConfig(); $userManager = new OCA\user_ldap\lib\user\Manager($ocConfig, new OCA\user_ldap\lib\FilesystemHelper(), new OCA\user_ldap\lib\LogWrapper(), @@ -39,10 +39,12 @@ if(count($configPrefixes) === 1) { $dbc = \OC::$server->getDatabaseConnection(); $ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc)); $ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc)); - $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess); + $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess, $ocConfig); $groupBackend = new OCA\user_ldap\GROUP_LDAP($ldapAccess); } else if(count($configPrefixes) > 1) { - $userBackend = new OCA\user_ldap\User_Proxy($configPrefixes, $ldapWrapper); + $userBackend = new OCA\user_ldap\User_Proxy( + $configPrefixes, $ldapWrapper, $ocConfig + ); $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); } diff --git a/apps/user_ldap/appinfo/register_command.php b/apps/user_ldap/appinfo/register_command.php index 0e918b82335..6abfd699c90 100644 --- a/apps/user_ldap/appinfo/register_command.php +++ b/apps/user_ldap/appinfo/register_command.php @@ -15,12 +15,14 @@ use OCA\User_LDAP\lib\User\DeletedUsersIndex; $dbConnection = \OC::$server->getDatabaseConnection(); $userMapping = new UserMapping($dbConnection); $helper = new Helper(); +$ocConfig = \OC::$server->getConfig(); $uBackend = new User_Proxy( $helper->getServerConfigurationPrefixes(true), - new LDAP() + new LDAP(), + $ocConfig ); $deletedUsersIndex = new DeletedUsersIndex( - \OC::$server->getConfig(), $dbConnection, $userMapping + $ocConfig, $dbConnection, $userMapping ); $application->add(new OCA\user_ldap\Command\ShowConfig()); @@ -28,7 +30,7 @@ $application->add(new OCA\user_ldap\Command\SetConfig()); $application->add(new OCA\user_ldap\Command\TestConfig()); $application->add(new OCA\user_ldap\Command\CreateEmptyConfig()); $application->add(new OCA\user_ldap\Command\DeleteConfig()); -$application->add(new OCA\user_ldap\Command\Search()); +$application->add(new OCA\user_ldap\Command\Search($ocConfig)); $application->add(new OCA\user_ldap\Command\ShowRemnants($deletedUsersIndex)); $application->add(new OCA\user_ldap\Command\CheckUser( $uBackend, $helper, $deletedUsersIndex, $userMapping) |