|
31 | 31 | use OCA\User_LDAP\Controller\RenewPasswordController; |
32 | 32 | use OCA\User_LDAP\Events\GroupBackendRegistered; |
33 | 33 | use OCA\User_LDAP\Events\UserBackendRegistered; |
| 34 | +use OCA\User_LDAP\FilesystemHelper; |
34 | 35 | use OCA\User_LDAP\Group_Proxy; |
35 | 36 | use OCA\User_LDAP\GroupPluginManager; |
36 | 37 | use OCA\User_LDAP\Handler\ExtStorageConfigHandler; |
37 | 38 | use OCA\User_LDAP\Helper; |
38 | 39 | use OCA\User_LDAP\ILDAPWrapper; |
39 | 40 | use OCA\User_LDAP\LDAP; |
40 | 41 | use OCA\User_LDAP\Notification\Notifier; |
| 42 | +use OCA\User_LDAP\User\Manager; |
41 | 43 | use OCA\User_LDAP\User_Proxy; |
42 | 44 | use OCA\User_LDAP\UserPluginManager; |
43 | 45 | use OCP\AppFramework\App; |
|
46 | 48 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
47 | 49 | use OCP\AppFramework\IAppContainer; |
48 | 50 | use OCP\EventDispatcher\IEventDispatcher; |
| 51 | +use OCP\IAvatarManager; |
| 52 | +use OCP\IConfig; |
49 | 53 | use OCP\IGroupManager; |
50 | 54 | use OCP\IL10N; |
| 55 | +use OCP\Image; |
51 | 56 | use OCP\IServerContainer; |
| 57 | +use OCP\IUserManager; |
52 | 58 | use OCP\Notification\IManager as INotificationManager; |
| 59 | +use OCP\Share\IManager as IShareManager; |
| 60 | +use Psr\Container\ContainerInterface; |
| 61 | +use Psr\Log\LoggerInterface; |
53 | 62 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
54 | 63 |
|
55 | 64 | class Application extends App implements IBootstrap { |
@@ -87,6 +96,24 @@ public function __construct() { |
87 | 96 |
|
88 | 97 | public function register(IRegistrationContext $context): void { |
89 | 98 | $context->registerNotifierService(Notifier::class); |
| 99 | + |
| 100 | + $context->registerService( |
| 101 | + Manager::class, |
| 102 | + function (ContainerInterface $c) { |
| 103 | + return new Manager( |
| 104 | + $c->get(IConfig::class), |
| 105 | + $c->get(FilesystemHelper::class), |
| 106 | + $c->get(LoggerInterface::class), |
| 107 | + $c->get(IAvatarManager::class), |
| 108 | + $c->get(Image::class), |
| 109 | + $c->get(IUserManager::class), |
| 110 | + $c->get(INotificationManager::class), |
| 111 | + $c->get(IShareManager::class), |
| 112 | + ); |
| 113 | + }, |
| 114 | + // the instance is specific to a lazy bound Access instance, thus cannot be shared. |
| 115 | + false |
| 116 | + ); |
90 | 117 | } |
91 | 118 |
|
92 | 119 | public function boot(IBootContext $context): void { |
|
0 commit comments