diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-02-13 00:14:56 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-02-14 15:22:22 +0100 |
commit | 792bcb82ae5149c86afcd4d550e3a22d60d330f7 (patch) | |
tree | ca2ecccf6865254fb7ed463424a4ae34d7ddeded /apps/user_ldap/lib/AppInfo | |
parent | a26bcd8e8fa11870c9192d24c73fbef3ef6112de (diff) | |
download | nextcloud-server-792bcb82ae5149c86afcd4d550e3a22d60d330f7.tar.gz nextcloud-server-792bcb82ae5149c86afcd4d550e3a22d60d330f7.zip |
add LDAP ConfigHandler for external storages and "$home" var
* handler registered upon OCA\\Files_External::loadAdditionalBackends
event as user_ldap is loaded before files_external
* new configuration field "ldapExtStorageHomeAttribute" (not in GUI yet)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/AppInfo')
-rw-r--r-- | apps/user_ldap/lib/AppInfo/Application.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php index 59d7cdb4924..7e0c3534488 100644 --- a/apps/user_ldap/lib/AppInfo/Application.php +++ b/apps/user_ldap/lib/AppInfo/Application.php @@ -23,7 +23,9 @@ namespace OCA\User_LDAP\AppInfo; +use OCA\Files_External\Service\BackendService; use OCA\User_LDAP\Controller\RenewPasswordController; +use OCA\User_LDAP\Handler\ExtStorageConfigHandler; use OCA\User_LDAP\ILDAPWrapper; use OCA\User_LDAP\LDAP; use OCP\AppFramework\App; @@ -57,4 +59,18 @@ class Application extends App { return new LDAP(); }); } + + public function registerBackendDependents() { + $container = $this->getContainer(); + + $container->getServer()->getEventDispatcher()->addListener( + 'OCA\\Files_External::loadAdditionalBackends', + function() use ($container) { + $storagesBackendService = $container->query(BackendService::class); + $storagesBackendService->registerConfigHandler('home', function () use ($container) { + return $container->query(ExtStorageConfigHandler::class); + }); + } + ); + } } |