diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-09-10 17:11:02 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-09-27 13:34:15 +0200 |
commit | d4f92494a23747af545d7ebb70eaf3e417f46eaa (patch) | |
tree | e0b0610eca24fb38028bc50ada7bd7b397358c97 /apps/user_ldap/appinfo/app.php | |
parent | b9cc2ad660fb7a43f2b0a12e1290527fcebb995a (diff) | |
download | nextcloud-server-d4f92494a23747af545d7ebb70eaf3e417f46eaa.tar.gz nextcloud-server-d4f92494a23747af545d7ebb70eaf3e417f46eaa.zip |
LDAP: make Access be a dependency to the user and group backend instead of inheriting it.
Diffstat (limited to 'apps/user_ldap/appinfo/app.php')
-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) { |