@@ -65,241 +65,241 @@ |
||
| 65 | 65 | |
| 66 | 66 | class Application extends App { |
| 67 | 67 | |
| 68 | - const APP_ID = 'files_sharing'; |
|
| 69 | - |
|
| 70 | - public function __construct(array $urlParams = []) { |
|
| 71 | - parent::__construct(self::APP_ID, $urlParams); |
|
| 72 | - |
|
| 73 | - $container = $this->getContainer(); |
|
| 74 | - |
|
| 75 | - /** @var IServerContainer $server */ |
|
| 76 | - $server = $container->getServer(); |
|
| 77 | - |
|
| 78 | - /** @var IEventDispatcher $dispatcher */ |
|
| 79 | - $dispatcher = $container->query(IEventDispatcher::class); |
|
| 80 | - $mountProviderCollection = $server->getMountProviderCollection(); |
|
| 81 | - $notifications = $server->getNotificationManager(); |
|
| 82 | - |
|
| 83 | - /** |
|
| 84 | - * Controllers |
|
| 85 | - */ |
|
| 86 | - $container->registerService('ShareController', function (SimpleContainer $c) use ($server) { |
|
| 87 | - $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application(); |
|
| 88 | - return new ShareController( |
|
| 89 | - $c->query('AppName'), |
|
| 90 | - $c->query('Request'), |
|
| 91 | - $server->getConfig(), |
|
| 92 | - $server->getURLGenerator(), |
|
| 93 | - $server->getUserManager(), |
|
| 94 | - $server->getLogger(), |
|
| 95 | - $server->getActivityManager(), |
|
| 96 | - $server->getShareManager(), |
|
| 97 | - $server->getSession(), |
|
| 98 | - $server->getPreviewManager(), |
|
| 99 | - $server->getRootFolder(), |
|
| 100 | - $federatedSharingApp->getFederatedShareProvider(), |
|
| 101 | - $server->getEventDispatcher(), |
|
| 102 | - $server->getL10N($c->query('AppName')), |
|
| 103 | - $server->query(Defaults::class) |
|
| 104 | - ); |
|
| 105 | - }); |
|
| 106 | - $container->registerService('ExternalSharesController', function (SimpleContainer $c) { |
|
| 107 | - return new ExternalSharesController( |
|
| 108 | - $c->query('AppName'), |
|
| 109 | - $c->query('Request'), |
|
| 110 | - $c->query('ExternalManager'), |
|
| 111 | - $c->query('HttpClientService') |
|
| 112 | - ); |
|
| 113 | - }); |
|
| 114 | - |
|
| 115 | - /** |
|
| 116 | - * Core class wrappers |
|
| 117 | - */ |
|
| 118 | - $container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) { |
|
| 119 | - return $server->getHTTPClientService(); |
|
| 120 | - }); |
|
| 121 | - $container->registerService(ICloudIdManager::class, function (SimpleContainer $c) use ($server) { |
|
| 122 | - return $server->getCloudIdManager(); |
|
| 123 | - }); |
|
| 124 | - $container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) { |
|
| 125 | - $user = $server->getUserSession()->getUser(); |
|
| 126 | - $uid = $user ? $user->getUID() : null; |
|
| 127 | - return new \OCA\Files_Sharing\External\Manager( |
|
| 128 | - $server->getDatabaseConnection(), |
|
| 129 | - \OC\Files\Filesystem::getMountManager(), |
|
| 130 | - \OC\Files\Filesystem::getLoader(), |
|
| 131 | - $server->getHTTPClientService(), |
|
| 132 | - $server->getNotificationManager(), |
|
| 133 | - $server->query(\OCP\OCS\IDiscoveryService::class), |
|
| 134 | - $server->getCloudFederationProviderManager(), |
|
| 135 | - $server->getCloudFederationFactory(), |
|
| 136 | - $server->getGroupManager(), |
|
| 137 | - $server->getUserManager(), |
|
| 138 | - $uid |
|
| 139 | - ); |
|
| 140 | - }); |
|
| 141 | - $container->registerAlias(Manager::class, 'ExternalManager'); |
|
| 142 | - |
|
| 143 | - /** |
|
| 144 | - * Middleware |
|
| 145 | - */ |
|
| 146 | - $container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use ($server) { |
|
| 147 | - return new SharingCheckMiddleware( |
|
| 148 | - $c->query('AppName'), |
|
| 149 | - $server->getConfig(), |
|
| 150 | - $server->getAppManager(), |
|
| 151 | - $server->query(IControllerMethodReflector::class), |
|
| 152 | - $server->getShareManager(), |
|
| 153 | - $server->getRequest() |
|
| 154 | - ); |
|
| 155 | - }); |
|
| 156 | - |
|
| 157 | - $container->registerService(ShareInfoMiddleware::class, function () use ($server) { |
|
| 158 | - return new ShareInfoMiddleware( |
|
| 159 | - $server->getShareManager() |
|
| 160 | - ); |
|
| 161 | - }); |
|
| 162 | - |
|
| 163 | - // Execute middlewares |
|
| 164 | - $container->registerMiddleWare('SharingCheckMiddleware'); |
|
| 165 | - $container->registerMiddleWare(OCSShareAPIMiddleware::class); |
|
| 166 | - $container->registerMiddleWare(ShareInfoMiddleware::class); |
|
| 167 | - |
|
| 168 | - $container->registerService('MountProvider', function (IContainer $c) { |
|
| 169 | - /** @var \OCP\IServerContainer $server */ |
|
| 170 | - $server = $c->query('ServerContainer'); |
|
| 171 | - return new MountProvider( |
|
| 172 | - $server->getConfig(), |
|
| 173 | - $server->getShareManager(), |
|
| 174 | - $server->getLogger() |
|
| 175 | - ); |
|
| 176 | - }); |
|
| 177 | - |
|
| 178 | - $container->registerService('ExternalMountProvider', function (IContainer $c) { |
|
| 179 | - /** @var \OCP\IServerContainer $server */ |
|
| 180 | - $server = $c->query('ServerContainer'); |
|
| 181 | - return new \OCA\Files_Sharing\External\MountProvider( |
|
| 182 | - $server->getDatabaseConnection(), |
|
| 183 | - function() use ($c) { |
|
| 184 | - return $c->query('ExternalManager'); |
|
| 185 | - }, |
|
| 186 | - $server->getCloudIdManager() |
|
| 187 | - ); |
|
| 188 | - }); |
|
| 189 | - |
|
| 190 | - /** |
|
| 191 | - * Register capabilities |
|
| 192 | - */ |
|
| 193 | - $container->registerCapability(Capabilities::class); |
|
| 194 | - |
|
| 195 | - $notifications->registerNotifierService(Notifier::class); |
|
| 196 | - |
|
| 197 | - $this->registerMountProviders($mountProviderCollection); |
|
| 198 | - $this->registerEventsScripts($dispatcher); |
|
| 199 | - $this->setupSharingMenus(); |
|
| 200 | - |
|
| 201 | - /** |
|
| 202 | - * Always add main sharing script |
|
| 203 | - */ |
|
| 204 | - Util::addScript(self::APP_ID, 'dist/main'); |
|
| 205 | - } |
|
| 206 | - |
|
| 207 | - protected function registerMountProviders(IMountProviderCollection $mountProviderCollection) { |
|
| 208 | - $mountProviderCollection->registerProvider($this->getContainer()->query('MountProvider')); |
|
| 209 | - $mountProviderCollection->registerProvider($this->getContainer()->query('ExternalMountProvider')); |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - protected function registerEventsScripts(IEventDispatcher $dispatcher) { |
|
| 213 | - // sidebar and files scripts |
|
| 214 | - $dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class); |
|
| 215 | - $dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class); |
|
| 216 | - $dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() { |
|
| 217 | - \OCP\Util::addScript('files_sharing', 'dist/collaboration'); |
|
| 218 | - }); |
|
| 219 | - $dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class); |
|
| 220 | - $dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class); |
|
| 221 | - |
|
| 222 | - // notifications api to accept incoming user shares |
|
| 223 | - $dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) { |
|
| 224 | - /** @var Listener $listener */ |
|
| 225 | - $listener = $this->getContainer()->query(Listener::class); |
|
| 226 | - $listener->shareNotification($event); |
|
| 227 | - }); |
|
| 228 | - $dispatcher->addListener(IGroup::class . '::postAddUser', function(GenericEvent $event) { |
|
| 229 | - /** @var Listener $listener */ |
|
| 230 | - $listener = $this->getContainer()->query(Listener::class); |
|
| 231 | - $listener->userAddedToGroup($event); |
|
| 232 | - }); |
|
| 233 | - } |
|
| 234 | - |
|
| 235 | - protected function setupSharingMenus() { |
|
| 236 | - $config = \OC::$server->getConfig(); |
|
| 237 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 238 | - |
|
| 239 | - if ($config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') { |
|
| 240 | - return; |
|
| 241 | - } |
|
| 242 | - |
|
| 243 | - $sharingSublistArray = []; |
|
| 244 | - |
|
| 245 | - if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 246 | - array_push($sharingSublistArray, [ |
|
| 247 | - 'id' => 'sharingout', |
|
| 248 | - 'appname' => 'files_sharing', |
|
| 249 | - 'script' => 'list.php', |
|
| 250 | - 'order' => 16, |
|
| 251 | - 'name' => $l->t('Shared with others'), |
|
| 252 | - ]); |
|
| 253 | - } |
|
| 254 | - |
|
| 255 | - array_push($sharingSublistArray, [ |
|
| 256 | - 'id' => 'sharingin', |
|
| 257 | - 'appname' => 'files_sharing', |
|
| 258 | - 'script' => 'list.php', |
|
| 259 | - 'order' => 15, |
|
| 260 | - 'name' => $l->t('Shared with you'), |
|
| 261 | - ]); |
|
| 262 | - |
|
| 263 | - if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 264 | - // Check if sharing by link is enabled |
|
| 265 | - if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 266 | - array_push($sharingSublistArray, [ |
|
| 267 | - 'id' => 'sharinglinks', |
|
| 268 | - 'appname' => 'files_sharing', |
|
| 269 | - 'script' => 'list.php', |
|
| 270 | - 'order' => 17, |
|
| 271 | - 'name' => $l->t('Shared by link'), |
|
| 272 | - ]); |
|
| 273 | - } |
|
| 274 | - } |
|
| 275 | - |
|
| 276 | - array_push($sharingSublistArray, [ |
|
| 277 | - 'id' => 'deletedshares', |
|
| 278 | - 'appname' => 'files_sharing', |
|
| 279 | - 'script' => 'list.php', |
|
| 280 | - 'order' => 19, |
|
| 281 | - 'name' => $l->t('Deleted shares'), |
|
| 282 | - ]); |
|
| 283 | - |
|
| 284 | - array_push($sharingSublistArray, [ |
|
| 285 | - 'id' => 'pendingshares', |
|
| 286 | - 'appname' => 'files_sharing', |
|
| 287 | - 'script' => 'list.php', |
|
| 288 | - 'order' => 19, |
|
| 289 | - 'name' => $l->t('Pending shares'), |
|
| 290 | - ]); |
|
| 291 | - |
|
| 292 | - |
|
| 293 | - // show_Quick_Access stored as string |
|
| 294 | - \OCA\Files\App::getNavigationManager()->add([ |
|
| 295 | - 'id' => 'shareoverview', |
|
| 296 | - 'appname' => 'files_sharing', |
|
| 297 | - 'script' => 'list.php', |
|
| 298 | - 'order' => 18, |
|
| 299 | - 'name' => $l->t('Shares'), |
|
| 300 | - 'classes' => 'collapsible', |
|
| 301 | - 'sublist' => $sharingSublistArray, |
|
| 302 | - 'expandedState' => 'show_sharing_menu' |
|
| 303 | - ]); |
|
| 304 | - } |
|
| 68 | + const APP_ID = 'files_sharing'; |
|
| 69 | + |
|
| 70 | + public function __construct(array $urlParams = []) { |
|
| 71 | + parent::__construct(self::APP_ID, $urlParams); |
|
| 72 | + |
|
| 73 | + $container = $this->getContainer(); |
|
| 74 | + |
|
| 75 | + /** @var IServerContainer $server */ |
|
| 76 | + $server = $container->getServer(); |
|
| 77 | + |
|
| 78 | + /** @var IEventDispatcher $dispatcher */ |
|
| 79 | + $dispatcher = $container->query(IEventDispatcher::class); |
|
| 80 | + $mountProviderCollection = $server->getMountProviderCollection(); |
|
| 81 | + $notifications = $server->getNotificationManager(); |
|
| 82 | + |
|
| 83 | + /** |
|
| 84 | + * Controllers |
|
| 85 | + */ |
|
| 86 | + $container->registerService('ShareController', function (SimpleContainer $c) use ($server) { |
|
| 87 | + $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application(); |
|
| 88 | + return new ShareController( |
|
| 89 | + $c->query('AppName'), |
|
| 90 | + $c->query('Request'), |
|
| 91 | + $server->getConfig(), |
|
| 92 | + $server->getURLGenerator(), |
|
| 93 | + $server->getUserManager(), |
|
| 94 | + $server->getLogger(), |
|
| 95 | + $server->getActivityManager(), |
|
| 96 | + $server->getShareManager(), |
|
| 97 | + $server->getSession(), |
|
| 98 | + $server->getPreviewManager(), |
|
| 99 | + $server->getRootFolder(), |
|
| 100 | + $federatedSharingApp->getFederatedShareProvider(), |
|
| 101 | + $server->getEventDispatcher(), |
|
| 102 | + $server->getL10N($c->query('AppName')), |
|
| 103 | + $server->query(Defaults::class) |
|
| 104 | + ); |
|
| 105 | + }); |
|
| 106 | + $container->registerService('ExternalSharesController', function (SimpleContainer $c) { |
|
| 107 | + return new ExternalSharesController( |
|
| 108 | + $c->query('AppName'), |
|
| 109 | + $c->query('Request'), |
|
| 110 | + $c->query('ExternalManager'), |
|
| 111 | + $c->query('HttpClientService') |
|
| 112 | + ); |
|
| 113 | + }); |
|
| 114 | + |
|
| 115 | + /** |
|
| 116 | + * Core class wrappers |
|
| 117 | + */ |
|
| 118 | + $container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) { |
|
| 119 | + return $server->getHTTPClientService(); |
|
| 120 | + }); |
|
| 121 | + $container->registerService(ICloudIdManager::class, function (SimpleContainer $c) use ($server) { |
|
| 122 | + return $server->getCloudIdManager(); |
|
| 123 | + }); |
|
| 124 | + $container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) { |
|
| 125 | + $user = $server->getUserSession()->getUser(); |
|
| 126 | + $uid = $user ? $user->getUID() : null; |
|
| 127 | + return new \OCA\Files_Sharing\External\Manager( |
|
| 128 | + $server->getDatabaseConnection(), |
|
| 129 | + \OC\Files\Filesystem::getMountManager(), |
|
| 130 | + \OC\Files\Filesystem::getLoader(), |
|
| 131 | + $server->getHTTPClientService(), |
|
| 132 | + $server->getNotificationManager(), |
|
| 133 | + $server->query(\OCP\OCS\IDiscoveryService::class), |
|
| 134 | + $server->getCloudFederationProviderManager(), |
|
| 135 | + $server->getCloudFederationFactory(), |
|
| 136 | + $server->getGroupManager(), |
|
| 137 | + $server->getUserManager(), |
|
| 138 | + $uid |
|
| 139 | + ); |
|
| 140 | + }); |
|
| 141 | + $container->registerAlias(Manager::class, 'ExternalManager'); |
|
| 142 | + |
|
| 143 | + /** |
|
| 144 | + * Middleware |
|
| 145 | + */ |
|
| 146 | + $container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use ($server) { |
|
| 147 | + return new SharingCheckMiddleware( |
|
| 148 | + $c->query('AppName'), |
|
| 149 | + $server->getConfig(), |
|
| 150 | + $server->getAppManager(), |
|
| 151 | + $server->query(IControllerMethodReflector::class), |
|
| 152 | + $server->getShareManager(), |
|
| 153 | + $server->getRequest() |
|
| 154 | + ); |
|
| 155 | + }); |
|
| 156 | + |
|
| 157 | + $container->registerService(ShareInfoMiddleware::class, function () use ($server) { |
|
| 158 | + return new ShareInfoMiddleware( |
|
| 159 | + $server->getShareManager() |
|
| 160 | + ); |
|
| 161 | + }); |
|
| 162 | + |
|
| 163 | + // Execute middlewares |
|
| 164 | + $container->registerMiddleWare('SharingCheckMiddleware'); |
|
| 165 | + $container->registerMiddleWare(OCSShareAPIMiddleware::class); |
|
| 166 | + $container->registerMiddleWare(ShareInfoMiddleware::class); |
|
| 167 | + |
|
| 168 | + $container->registerService('MountProvider', function (IContainer $c) { |
|
| 169 | + /** @var \OCP\IServerContainer $server */ |
|
| 170 | + $server = $c->query('ServerContainer'); |
|
| 171 | + return new MountProvider( |
|
| 172 | + $server->getConfig(), |
|
| 173 | + $server->getShareManager(), |
|
| 174 | + $server->getLogger() |
|
| 175 | + ); |
|
| 176 | + }); |
|
| 177 | + |
|
| 178 | + $container->registerService('ExternalMountProvider', function (IContainer $c) { |
|
| 179 | + /** @var \OCP\IServerContainer $server */ |
|
| 180 | + $server = $c->query('ServerContainer'); |
|
| 181 | + return new \OCA\Files_Sharing\External\MountProvider( |
|
| 182 | + $server->getDatabaseConnection(), |
|
| 183 | + function() use ($c) { |
|
| 184 | + return $c->query('ExternalManager'); |
|
| 185 | + }, |
|
| 186 | + $server->getCloudIdManager() |
|
| 187 | + ); |
|
| 188 | + }); |
|
| 189 | + |
|
| 190 | + /** |
|
| 191 | + * Register capabilities |
|
| 192 | + */ |
|
| 193 | + $container->registerCapability(Capabilities::class); |
|
| 194 | + |
|
| 195 | + $notifications->registerNotifierService(Notifier::class); |
|
| 196 | + |
|
| 197 | + $this->registerMountProviders($mountProviderCollection); |
|
| 198 | + $this->registerEventsScripts($dispatcher); |
|
| 199 | + $this->setupSharingMenus(); |
|
| 200 | + |
|
| 201 | + /** |
|
| 202 | + * Always add main sharing script |
|
| 203 | + */ |
|
| 204 | + Util::addScript(self::APP_ID, 'dist/main'); |
|
| 205 | + } |
|
| 206 | + |
|
| 207 | + protected function registerMountProviders(IMountProviderCollection $mountProviderCollection) { |
|
| 208 | + $mountProviderCollection->registerProvider($this->getContainer()->query('MountProvider')); |
|
| 209 | + $mountProviderCollection->registerProvider($this->getContainer()->query('ExternalMountProvider')); |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + protected function registerEventsScripts(IEventDispatcher $dispatcher) { |
|
| 213 | + // sidebar and files scripts |
|
| 214 | + $dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class); |
|
| 215 | + $dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class); |
|
| 216 | + $dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() { |
|
| 217 | + \OCP\Util::addScript('files_sharing', 'dist/collaboration'); |
|
| 218 | + }); |
|
| 219 | + $dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class); |
|
| 220 | + $dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class); |
|
| 221 | + |
|
| 222 | + // notifications api to accept incoming user shares |
|
| 223 | + $dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) { |
|
| 224 | + /** @var Listener $listener */ |
|
| 225 | + $listener = $this->getContainer()->query(Listener::class); |
|
| 226 | + $listener->shareNotification($event); |
|
| 227 | + }); |
|
| 228 | + $dispatcher->addListener(IGroup::class . '::postAddUser', function(GenericEvent $event) { |
|
| 229 | + /** @var Listener $listener */ |
|
| 230 | + $listener = $this->getContainer()->query(Listener::class); |
|
| 231 | + $listener->userAddedToGroup($event); |
|
| 232 | + }); |
|
| 233 | + } |
|
| 234 | + |
|
| 235 | + protected function setupSharingMenus() { |
|
| 236 | + $config = \OC::$server->getConfig(); |
|
| 237 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 238 | + |
|
| 239 | + if ($config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') { |
|
| 240 | + return; |
|
| 241 | + } |
|
| 242 | + |
|
| 243 | + $sharingSublistArray = []; |
|
| 244 | + |
|
| 245 | + if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 246 | + array_push($sharingSublistArray, [ |
|
| 247 | + 'id' => 'sharingout', |
|
| 248 | + 'appname' => 'files_sharing', |
|
| 249 | + 'script' => 'list.php', |
|
| 250 | + 'order' => 16, |
|
| 251 | + 'name' => $l->t('Shared with others'), |
|
| 252 | + ]); |
|
| 253 | + } |
|
| 254 | + |
|
| 255 | + array_push($sharingSublistArray, [ |
|
| 256 | + 'id' => 'sharingin', |
|
| 257 | + 'appname' => 'files_sharing', |
|
| 258 | + 'script' => 'list.php', |
|
| 259 | + 'order' => 15, |
|
| 260 | + 'name' => $l->t('Shared with you'), |
|
| 261 | + ]); |
|
| 262 | + |
|
| 263 | + if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 264 | + // Check if sharing by link is enabled |
|
| 265 | + if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 266 | + array_push($sharingSublistArray, [ |
|
| 267 | + 'id' => 'sharinglinks', |
|
| 268 | + 'appname' => 'files_sharing', |
|
| 269 | + 'script' => 'list.php', |
|
| 270 | + 'order' => 17, |
|
| 271 | + 'name' => $l->t('Shared by link'), |
|
| 272 | + ]); |
|
| 273 | + } |
|
| 274 | + } |
|
| 275 | + |
|
| 276 | + array_push($sharingSublistArray, [ |
|
| 277 | + 'id' => 'deletedshares', |
|
| 278 | + 'appname' => 'files_sharing', |
|
| 279 | + 'script' => 'list.php', |
|
| 280 | + 'order' => 19, |
|
| 281 | + 'name' => $l->t('Deleted shares'), |
|
| 282 | + ]); |
|
| 283 | + |
|
| 284 | + array_push($sharingSublistArray, [ |
|
| 285 | + 'id' => 'pendingshares', |
|
| 286 | + 'appname' => 'files_sharing', |
|
| 287 | + 'script' => 'list.php', |
|
| 288 | + 'order' => 19, |
|
| 289 | + 'name' => $l->t('Pending shares'), |
|
| 290 | + ]); |
|
| 291 | + |
|
| 292 | + |
|
| 293 | + // show_Quick_Access stored as string |
|
| 294 | + \OCA\Files\App::getNavigationManager()->add([ |
|
| 295 | + 'id' => 'shareoverview', |
|
| 296 | + 'appname' => 'files_sharing', |
|
| 297 | + 'script' => 'list.php', |
|
| 298 | + 'order' => 18, |
|
| 299 | + 'name' => $l->t('Shares'), |
|
| 300 | + 'classes' => 'collapsible', |
|
| 301 | + 'sublist' => $sharingSublistArray, |
|
| 302 | + 'expandedState' => 'show_sharing_menu' |
|
| 303 | + ]); |
|
| 304 | + } |
|
| 305 | 305 | } |
@@ -34,49 +34,49 @@ |
||
| 34 | 34 | |
| 35 | 35 | class UserAddedToGroupListener implements IEventListener { |
| 36 | 36 | |
| 37 | - /** @var IManager */ |
|
| 38 | - private $shareManager; |
|
| 37 | + /** @var IManager */ |
|
| 38 | + private $shareManager; |
|
| 39 | 39 | |
| 40 | - /** @var IConfig */ |
|
| 41 | - private $config; |
|
| 40 | + /** @var IConfig */ |
|
| 41 | + private $config; |
|
| 42 | 42 | |
| 43 | - public function __construct(IManager $shareManager, IConfig $config) { |
|
| 44 | - $this->shareManager = $shareManager; |
|
| 45 | - $this->config = $config; |
|
| 46 | - } |
|
| 43 | + public function __construct(IManager $shareManager, IConfig $config) { |
|
| 44 | + $this->shareManager = $shareManager; |
|
| 45 | + $this->config = $config; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - public function handle(Event $event): void { |
|
| 49 | - if (!($event instanceof UserAddedEvent)) { |
|
| 50 | - return; |
|
| 51 | - } |
|
| 48 | + public function handle(Event $event): void { |
|
| 49 | + if (!($event instanceof UserAddedEvent)) { |
|
| 50 | + return; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - $user = $event->getUser(); |
|
| 54 | - $group = $event->getGroup(); |
|
| 53 | + $user = $event->getUser(); |
|
| 54 | + $group = $event->getGroup(); |
|
| 55 | 55 | |
| 56 | - // This user doesn't have autoaccept so we can skip it all |
|
| 57 | - if (!$this->hasAutoAccept($user->getUID())) { |
|
| 58 | - return; |
|
| 59 | - } |
|
| 56 | + // This user doesn't have autoaccept so we can skip it all |
|
| 57 | + if (!$this->hasAutoAccept($user->getUID())) { |
|
| 58 | + return; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - // Get all group shares this user has access to now to filter later |
|
| 62 | - $shares = $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_GROUP); |
|
| 61 | + // Get all group shares this user has access to now to filter later |
|
| 62 | + $shares = $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_GROUP); |
|
| 63 | 63 | |
| 64 | - foreach ($shares as $share) { |
|
| 65 | - // If this is not the new group we can skip it |
|
| 66 | - if ($share->getSharedWith() !== $group->getGID()) { |
|
| 67 | - continue; |
|
| 68 | - } |
|
| 64 | + foreach ($shares as $share) { |
|
| 65 | + // If this is not the new group we can skip it |
|
| 66 | + if ($share->getSharedWith() !== $group->getGID()) { |
|
| 67 | + continue; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - // Accept the share if needed |
|
| 71 | - $this->shareManager->acceptShare($share, $user->getUID()); |
|
| 72 | - } |
|
| 73 | - } |
|
| 70 | + // Accept the share if needed |
|
| 71 | + $this->shareManager->acceptShare($share, $user->getUID()); |
|
| 72 | + } |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | 75 | |
| 76 | - private function hasAutoAccept(string $userId): bool { |
|
| 77 | - $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; |
|
| 78 | - $acceptDefault = $this->config->getUserValue($userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; |
|
| 79 | - return (!$this->config->getSystemValueBool('sharing.force_share_accept', false) && $acceptDefault); |
|
| 80 | - } |
|
| 76 | + private function hasAutoAccept(string $userId): bool { |
|
| 77 | + $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; |
|
| 78 | + $acceptDefault = $this->config->getUserValue($userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; |
|
| 79 | + return (!$this->config->getSystemValueBool('sharing.force_share_accept', false) && $acceptDefault); |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | 82 | } |
@@ -6,66 +6,66 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\Files_Sharing\\Activity\\Filter' => $baseDir . '/../lib/Activity/Filter.php', |
|
| 10 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => $baseDir . '/../lib/Activity/Providers/Base.php', |
|
| 11 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => $baseDir . '/../lib/Activity/Providers/Downloads.php', |
|
| 12 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => $baseDir . '/../lib/Activity/Providers/Groups.php', |
|
| 13 | - 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => $baseDir . '/../lib/Activity/Providers/PublicLinks.php', |
|
| 14 | - 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => $baseDir . '/../lib/Activity/Providers/RemoteShares.php', |
|
| 15 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => $baseDir . '/../lib/Activity/Providers/Users.php', |
|
| 16 | - 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => $baseDir . '/../lib/Activity/Settings/PublicLinks.php', |
|
| 17 | - 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => $baseDir . '/../lib/Activity/Settings/RemoteShare.php', |
|
| 18 | - 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => $baseDir . '/../lib/Activity/Settings/Shared.php', |
|
| 19 | - 'OCA\\Files_Sharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 20 | - 'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => $baseDir . '/../lib/BackgroundJob/FederatedSharesDiscoverJob.php', |
|
| 21 | - 'OCA\\Files_Sharing\\Cache' => $baseDir . '/../lib/Cache.php', |
|
| 22 | - 'OCA\\Files_Sharing\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
| 23 | - 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => $baseDir . '/../lib/Collaboration/ShareRecipientSorter.php', |
|
| 24 | - 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => $baseDir . '/../lib/Command/CleanupRemoteStorages.php', |
|
| 25 | - 'OCA\\Files_Sharing\\Command\\ExiprationNotification' => $baseDir . '/../lib/Command/ExiprationNotification.php', |
|
| 26 | - 'OCA\\Files_Sharing\\Controller\\AcceptController' => $baseDir . '/../lib/Controller/AcceptController.php', |
|
| 27 | - 'OCA\\Files_Sharing\\Controller\\DeletedShareAPIController' => $baseDir . '/../lib/Controller/DeletedShareAPIController.php', |
|
| 28 | - 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => $baseDir . '/../lib/Controller/ExternalSharesController.php', |
|
| 29 | - 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => $baseDir . '/../lib/Controller/PublicPreviewController.php', |
|
| 30 | - 'OCA\\Files_Sharing\\Controller\\RemoteController' => $baseDir . '/../lib/Controller/RemoteController.php', |
|
| 31 | - 'OCA\\Files_Sharing\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
| 32 | - 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => $baseDir . '/../lib/Controller/ShareAPIController.php', |
|
| 33 | - 'OCA\\Files_Sharing\\Controller\\ShareController' => $baseDir . '/../lib/Controller/ShareController.php', |
|
| 34 | - 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => $baseDir . '/../lib/Controller/ShareInfoController.php', |
|
| 35 | - 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => $baseDir . '/../lib/Controller/ShareesAPIController.php', |
|
| 36 | - 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => $baseDir . '/../lib/DeleteOrphanedSharesJob.php', |
|
| 37 | - 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => $baseDir . '/../lib/Exceptions/BrokenPath.php', |
|
| 38 | - 'OCA\\Files_Sharing\\Exceptions\\S2SException' => $baseDir . '/../lib/Exceptions/S2SException.php', |
|
| 39 | - 'OCA\\Files_Sharing\\Exceptions\\SharingRightsException' => $baseDir . '/../lib/Exceptions/SharingRightsException.php', |
|
| 40 | - 'OCA\\Files_Sharing\\ExpireSharesJob' => $baseDir . '/../lib/ExpireSharesJob.php', |
|
| 41 | - 'OCA\\Files_Sharing\\External\\Cache' => $baseDir . '/../lib/External/Cache.php', |
|
| 42 | - 'OCA\\Files_Sharing\\External\\Manager' => $baseDir . '/../lib/External/Manager.php', |
|
| 43 | - 'OCA\\Files_Sharing\\External\\Mount' => $baseDir . '/../lib/External/Mount.php', |
|
| 44 | - 'OCA\\Files_Sharing\\External\\MountProvider' => $baseDir . '/../lib/External/MountProvider.php', |
|
| 45 | - 'OCA\\Files_Sharing\\External\\Scanner' => $baseDir . '/../lib/External/Scanner.php', |
|
| 46 | - 'OCA\\Files_Sharing\\External\\Storage' => $baseDir . '/../lib/External/Storage.php', |
|
| 47 | - 'OCA\\Files_Sharing\\External\\Watcher' => $baseDir . '/../lib/External/Watcher.php', |
|
| 48 | - 'OCA\\Files_Sharing\\Helper' => $baseDir . '/../lib/Helper.php', |
|
| 49 | - 'OCA\\Files_Sharing\\Hooks' => $baseDir . '/../lib/Hooks.php', |
|
| 50 | - 'OCA\\Files_Sharing\\ISharedStorage' => $baseDir . '/../lib/ISharedStorage.php', |
|
| 51 | - 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => $baseDir . '/../lib/Listener/LoadAdditionalListener.php', |
|
| 52 | - 'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php', |
|
| 53 | - 'OCA\\Files_Sharing\\Listener\\UserAddedToGroupListener' => $baseDir . '/../lib/Listener/UserAddedToGroupListener.php', |
|
| 54 | - 'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => $baseDir . '/../lib/Listener/UserShareAcceptanceListener.php', |
|
| 55 | - 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => $baseDir . '/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
| 56 | - 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => $baseDir . '/../lib/Middleware/ShareInfoMiddleware.php', |
|
| 57 | - 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => $baseDir . '/../lib/Middleware/SharingCheckMiddleware.php', |
|
| 58 | - 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => $baseDir . '/../lib/Migration/OwncloudGuestShareType.php', |
|
| 59 | - 'OCA\\Files_Sharing\\Migration\\SetAcceptedStatus' => $baseDir . '/../lib/Migration/SetAcceptedStatus.php', |
|
| 60 | - 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => $baseDir . '/../lib/Migration/SetPasswordColumn.php', |
|
| 61 | - 'OCA\\Files_Sharing\\MountProvider' => $baseDir . '/../lib/MountProvider.php', |
|
| 62 | - 'OCA\\Files_Sharing\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php', |
|
| 63 | - 'OCA\\Files_Sharing\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
| 64 | - 'OCA\\Files_Sharing\\Scanner' => $baseDir . '/../lib/Scanner.php', |
|
| 65 | - 'OCA\\Files_Sharing\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
| 66 | - 'OCA\\Files_Sharing\\ShareBackend\\File' => $baseDir . '/../lib/ShareBackend/File.php', |
|
| 67 | - 'OCA\\Files_Sharing\\ShareBackend\\Folder' => $baseDir . '/../lib/ShareBackend/Folder.php', |
|
| 68 | - 'OCA\\Files_Sharing\\SharedMount' => $baseDir . '/../lib/SharedMount.php', |
|
| 69 | - 'OCA\\Files_Sharing\\SharedStorage' => $baseDir . '/../lib/SharedStorage.php', |
|
| 70 | - 'OCA\\Files_Sharing\\Updater' => $baseDir . '/../lib/Updater.php', |
|
| 9 | + 'OCA\\Files_Sharing\\Activity\\Filter' => $baseDir.'/../lib/Activity/Filter.php', |
|
| 10 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => $baseDir.'/../lib/Activity/Providers/Base.php', |
|
| 11 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => $baseDir.'/../lib/Activity/Providers/Downloads.php', |
|
| 12 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => $baseDir.'/../lib/Activity/Providers/Groups.php', |
|
| 13 | + 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => $baseDir.'/../lib/Activity/Providers/PublicLinks.php', |
|
| 14 | + 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => $baseDir.'/../lib/Activity/Providers/RemoteShares.php', |
|
| 15 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => $baseDir.'/../lib/Activity/Providers/Users.php', |
|
| 16 | + 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => $baseDir.'/../lib/Activity/Settings/PublicLinks.php', |
|
| 17 | + 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => $baseDir.'/../lib/Activity/Settings/RemoteShare.php', |
|
| 18 | + 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => $baseDir.'/../lib/Activity/Settings/Shared.php', |
|
| 19 | + 'OCA\\Files_Sharing\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 20 | + 'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => $baseDir.'/../lib/BackgroundJob/FederatedSharesDiscoverJob.php', |
|
| 21 | + 'OCA\\Files_Sharing\\Cache' => $baseDir.'/../lib/Cache.php', |
|
| 22 | + 'OCA\\Files_Sharing\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
| 23 | + 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => $baseDir.'/../lib/Collaboration/ShareRecipientSorter.php', |
|
| 24 | + 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => $baseDir.'/../lib/Command/CleanupRemoteStorages.php', |
|
| 25 | + 'OCA\\Files_Sharing\\Command\\ExiprationNotification' => $baseDir.'/../lib/Command/ExiprationNotification.php', |
|
| 26 | + 'OCA\\Files_Sharing\\Controller\\AcceptController' => $baseDir.'/../lib/Controller/AcceptController.php', |
|
| 27 | + 'OCA\\Files_Sharing\\Controller\\DeletedShareAPIController' => $baseDir.'/../lib/Controller/DeletedShareAPIController.php', |
|
| 28 | + 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => $baseDir.'/../lib/Controller/ExternalSharesController.php', |
|
| 29 | + 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => $baseDir.'/../lib/Controller/PublicPreviewController.php', |
|
| 30 | + 'OCA\\Files_Sharing\\Controller\\RemoteController' => $baseDir.'/../lib/Controller/RemoteController.php', |
|
| 31 | + 'OCA\\Files_Sharing\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
| 32 | + 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => $baseDir.'/../lib/Controller/ShareAPIController.php', |
|
| 33 | + 'OCA\\Files_Sharing\\Controller\\ShareController' => $baseDir.'/../lib/Controller/ShareController.php', |
|
| 34 | + 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => $baseDir.'/../lib/Controller/ShareInfoController.php', |
|
| 35 | + 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => $baseDir.'/../lib/Controller/ShareesAPIController.php', |
|
| 36 | + 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => $baseDir.'/../lib/DeleteOrphanedSharesJob.php', |
|
| 37 | + 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => $baseDir.'/../lib/Exceptions/BrokenPath.php', |
|
| 38 | + 'OCA\\Files_Sharing\\Exceptions\\S2SException' => $baseDir.'/../lib/Exceptions/S2SException.php', |
|
| 39 | + 'OCA\\Files_Sharing\\Exceptions\\SharingRightsException' => $baseDir.'/../lib/Exceptions/SharingRightsException.php', |
|
| 40 | + 'OCA\\Files_Sharing\\ExpireSharesJob' => $baseDir.'/../lib/ExpireSharesJob.php', |
|
| 41 | + 'OCA\\Files_Sharing\\External\\Cache' => $baseDir.'/../lib/External/Cache.php', |
|
| 42 | + 'OCA\\Files_Sharing\\External\\Manager' => $baseDir.'/../lib/External/Manager.php', |
|
| 43 | + 'OCA\\Files_Sharing\\External\\Mount' => $baseDir.'/../lib/External/Mount.php', |
|
| 44 | + 'OCA\\Files_Sharing\\External\\MountProvider' => $baseDir.'/../lib/External/MountProvider.php', |
|
| 45 | + 'OCA\\Files_Sharing\\External\\Scanner' => $baseDir.'/../lib/External/Scanner.php', |
|
| 46 | + 'OCA\\Files_Sharing\\External\\Storage' => $baseDir.'/../lib/External/Storage.php', |
|
| 47 | + 'OCA\\Files_Sharing\\External\\Watcher' => $baseDir.'/../lib/External/Watcher.php', |
|
| 48 | + 'OCA\\Files_Sharing\\Helper' => $baseDir.'/../lib/Helper.php', |
|
| 49 | + 'OCA\\Files_Sharing\\Hooks' => $baseDir.'/../lib/Hooks.php', |
|
| 50 | + 'OCA\\Files_Sharing\\ISharedStorage' => $baseDir.'/../lib/ISharedStorage.php', |
|
| 51 | + 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => $baseDir.'/../lib/Listener/LoadAdditionalListener.php', |
|
| 52 | + 'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => $baseDir.'/../lib/Listener/LoadSidebarListener.php', |
|
| 53 | + 'OCA\\Files_Sharing\\Listener\\UserAddedToGroupListener' => $baseDir.'/../lib/Listener/UserAddedToGroupListener.php', |
|
| 54 | + 'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => $baseDir.'/../lib/Listener/UserShareAcceptanceListener.php', |
|
| 55 | + 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => $baseDir.'/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
| 56 | + 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => $baseDir.'/../lib/Middleware/ShareInfoMiddleware.php', |
|
| 57 | + 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => $baseDir.'/../lib/Middleware/SharingCheckMiddleware.php', |
|
| 58 | + 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => $baseDir.'/../lib/Migration/OwncloudGuestShareType.php', |
|
| 59 | + 'OCA\\Files_Sharing\\Migration\\SetAcceptedStatus' => $baseDir.'/../lib/Migration/SetAcceptedStatus.php', |
|
| 60 | + 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => $baseDir.'/../lib/Migration/SetPasswordColumn.php', |
|
| 61 | + 'OCA\\Files_Sharing\\MountProvider' => $baseDir.'/../lib/MountProvider.php', |
|
| 62 | + 'OCA\\Files_Sharing\\Notification\\Listener' => $baseDir.'/../lib/Notification/Listener.php', |
|
| 63 | + 'OCA\\Files_Sharing\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
| 64 | + 'OCA\\Files_Sharing\\Scanner' => $baseDir.'/../lib/Scanner.php', |
|
| 65 | + 'OCA\\Files_Sharing\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
| 66 | + 'OCA\\Files_Sharing\\ShareBackend\\File' => $baseDir.'/../lib/ShareBackend/File.php', |
|
| 67 | + 'OCA\\Files_Sharing\\ShareBackend\\Folder' => $baseDir.'/../lib/ShareBackend/Folder.php', |
|
| 68 | + 'OCA\\Files_Sharing\\SharedMount' => $baseDir.'/../lib/SharedMount.php', |
|
| 69 | + 'OCA\\Files_Sharing\\SharedStorage' => $baseDir.'/../lib/SharedStorage.php', |
|
| 70 | + 'OCA\\Files_Sharing\\Updater' => $baseDir.'/../lib/Updater.php', |
|
| 71 | 71 | ); |
@@ -6,88 +6,88 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitFiles_Sharing |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\Files_Sharing\\' => 18, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\Files_Sharing\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'OCA\\Files_Sharing\\Activity\\Filter' => __DIR__ . '/..' . '/../lib/Activity/Filter.php', |
|
| 25 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => __DIR__ . '/..' . '/../lib/Activity/Providers/Base.php', |
|
| 26 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => __DIR__ . '/..' . '/../lib/Activity/Providers/Downloads.php', |
|
| 27 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => __DIR__ . '/..' . '/../lib/Activity/Providers/Groups.php', |
|
| 28 | - 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => __DIR__ . '/..' . '/../lib/Activity/Providers/PublicLinks.php', |
|
| 29 | - 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => __DIR__ . '/..' . '/../lib/Activity/Providers/RemoteShares.php', |
|
| 30 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => __DIR__ . '/..' . '/../lib/Activity/Providers/Users.php', |
|
| 31 | - 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => __DIR__ . '/..' . '/../lib/Activity/Settings/PublicLinks.php', |
|
| 32 | - 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => __DIR__ . '/..' . '/../lib/Activity/Settings/RemoteShare.php', |
|
| 33 | - 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => __DIR__ . '/..' . '/../lib/Activity/Settings/Shared.php', |
|
| 34 | - 'OCA\\Files_Sharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 35 | - 'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/FederatedSharesDiscoverJob.php', |
|
| 36 | - 'OCA\\Files_Sharing\\Cache' => __DIR__ . '/..' . '/../lib/Cache.php', |
|
| 37 | - 'OCA\\Files_Sharing\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
| 38 | - 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => __DIR__ . '/..' . '/../lib/Collaboration/ShareRecipientSorter.php', |
|
| 39 | - 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => __DIR__ . '/..' . '/../lib/Command/CleanupRemoteStorages.php', |
|
| 40 | - 'OCA\\Files_Sharing\\Command\\ExiprationNotification' => __DIR__ . '/..' . '/../lib/Command/ExiprationNotification.php', |
|
| 41 | - 'OCA\\Files_Sharing\\Controller\\AcceptController' => __DIR__ . '/..' . '/../lib/Controller/AcceptController.php', |
|
| 42 | - 'OCA\\Files_Sharing\\Controller\\DeletedShareAPIController' => __DIR__ . '/..' . '/../lib/Controller/DeletedShareAPIController.php', |
|
| 43 | - 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => __DIR__ . '/..' . '/../lib/Controller/ExternalSharesController.php', |
|
| 44 | - 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => __DIR__ . '/..' . '/../lib/Controller/PublicPreviewController.php', |
|
| 45 | - 'OCA\\Files_Sharing\\Controller\\RemoteController' => __DIR__ . '/..' . '/../lib/Controller/RemoteController.php', |
|
| 46 | - 'OCA\\Files_Sharing\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
| 47 | - 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => __DIR__ . '/..' . '/../lib/Controller/ShareAPIController.php', |
|
| 48 | - 'OCA\\Files_Sharing\\Controller\\ShareController' => __DIR__ . '/..' . '/../lib/Controller/ShareController.php', |
|
| 49 | - 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => __DIR__ . '/..' . '/../lib/Controller/ShareInfoController.php', |
|
| 50 | - 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => __DIR__ . '/..' . '/../lib/Controller/ShareesAPIController.php', |
|
| 51 | - 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => __DIR__ . '/..' . '/../lib/DeleteOrphanedSharesJob.php', |
|
| 52 | - 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => __DIR__ . '/..' . '/../lib/Exceptions/BrokenPath.php', |
|
| 53 | - 'OCA\\Files_Sharing\\Exceptions\\S2SException' => __DIR__ . '/..' . '/../lib/Exceptions/S2SException.php', |
|
| 54 | - 'OCA\\Files_Sharing\\Exceptions\\SharingRightsException' => __DIR__ . '/..' . '/../lib/Exceptions/SharingRightsException.php', |
|
| 55 | - 'OCA\\Files_Sharing\\ExpireSharesJob' => __DIR__ . '/..' . '/../lib/ExpireSharesJob.php', |
|
| 56 | - 'OCA\\Files_Sharing\\External\\Cache' => __DIR__ . '/..' . '/../lib/External/Cache.php', |
|
| 57 | - 'OCA\\Files_Sharing\\External\\Manager' => __DIR__ . '/..' . '/../lib/External/Manager.php', |
|
| 58 | - 'OCA\\Files_Sharing\\External\\Mount' => __DIR__ . '/..' . '/../lib/External/Mount.php', |
|
| 59 | - 'OCA\\Files_Sharing\\External\\MountProvider' => __DIR__ . '/..' . '/../lib/External/MountProvider.php', |
|
| 60 | - 'OCA\\Files_Sharing\\External\\Scanner' => __DIR__ . '/..' . '/../lib/External/Scanner.php', |
|
| 61 | - 'OCA\\Files_Sharing\\External\\Storage' => __DIR__ . '/..' . '/../lib/External/Storage.php', |
|
| 62 | - 'OCA\\Files_Sharing\\External\\Watcher' => __DIR__ . '/..' . '/../lib/External/Watcher.php', |
|
| 63 | - 'OCA\\Files_Sharing\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', |
|
| 64 | - 'OCA\\Files_Sharing\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', |
|
| 65 | - 'OCA\\Files_Sharing\\ISharedStorage' => __DIR__ . '/..' . '/../lib/ISharedStorage.php', |
|
| 66 | - 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalListener.php', |
|
| 67 | - 'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarListener.php', |
|
| 68 | - 'OCA\\Files_Sharing\\Listener\\UserAddedToGroupListener' => __DIR__ . '/..' . '/../lib/Listener/UserAddedToGroupListener.php', |
|
| 69 | - 'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => __DIR__ . '/..' . '/../lib/Listener/UserShareAcceptanceListener.php', |
|
| 70 | - 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
| 71 | - 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ShareInfoMiddleware.php', |
|
| 72 | - 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/SharingCheckMiddleware.php', |
|
| 73 | - 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => __DIR__ . '/..' . '/../lib/Migration/OwncloudGuestShareType.php', |
|
| 74 | - 'OCA\\Files_Sharing\\Migration\\SetAcceptedStatus' => __DIR__ . '/..' . '/../lib/Migration/SetAcceptedStatus.php', |
|
| 75 | - 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => __DIR__ . '/..' . '/../lib/Migration/SetPasswordColumn.php', |
|
| 76 | - 'OCA\\Files_Sharing\\MountProvider' => __DIR__ . '/..' . '/../lib/MountProvider.php', |
|
| 77 | - 'OCA\\Files_Sharing\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php', |
|
| 78 | - 'OCA\\Files_Sharing\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
| 79 | - 'OCA\\Files_Sharing\\Scanner' => __DIR__ . '/..' . '/../lib/Scanner.php', |
|
| 80 | - 'OCA\\Files_Sharing\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
| 81 | - 'OCA\\Files_Sharing\\ShareBackend\\File' => __DIR__ . '/..' . '/../lib/ShareBackend/File.php', |
|
| 82 | - 'OCA\\Files_Sharing\\ShareBackend\\Folder' => __DIR__ . '/..' . '/../lib/ShareBackend/Folder.php', |
|
| 83 | - 'OCA\\Files_Sharing\\SharedMount' => __DIR__ . '/..' . '/../lib/SharedMount.php', |
|
| 84 | - 'OCA\\Files_Sharing\\SharedStorage' => __DIR__ . '/..' . '/../lib/SharedStorage.php', |
|
| 85 | - 'OCA\\Files_Sharing\\Updater' => __DIR__ . '/..' . '/../lib/Updater.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'OCA\\Files_Sharing\\Activity\\Filter' => __DIR__.'/..'.'/../lib/Activity/Filter.php', |
|
| 25 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => __DIR__.'/..'.'/../lib/Activity/Providers/Base.php', |
|
| 26 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => __DIR__.'/..'.'/../lib/Activity/Providers/Downloads.php', |
|
| 27 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => __DIR__.'/..'.'/../lib/Activity/Providers/Groups.php', |
|
| 28 | + 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => __DIR__.'/..'.'/../lib/Activity/Providers/PublicLinks.php', |
|
| 29 | + 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => __DIR__.'/..'.'/../lib/Activity/Providers/RemoteShares.php', |
|
| 30 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => __DIR__.'/..'.'/../lib/Activity/Providers/Users.php', |
|
| 31 | + 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => __DIR__.'/..'.'/../lib/Activity/Settings/PublicLinks.php', |
|
| 32 | + 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => __DIR__.'/..'.'/../lib/Activity/Settings/RemoteShare.php', |
|
| 33 | + 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => __DIR__.'/..'.'/../lib/Activity/Settings/Shared.php', |
|
| 34 | + 'OCA\\Files_Sharing\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 35 | + 'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => __DIR__.'/..'.'/../lib/BackgroundJob/FederatedSharesDiscoverJob.php', |
|
| 36 | + 'OCA\\Files_Sharing\\Cache' => __DIR__.'/..'.'/../lib/Cache.php', |
|
| 37 | + 'OCA\\Files_Sharing\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
| 38 | + 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => __DIR__.'/..'.'/../lib/Collaboration/ShareRecipientSorter.php', |
|
| 39 | + 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => __DIR__.'/..'.'/../lib/Command/CleanupRemoteStorages.php', |
|
| 40 | + 'OCA\\Files_Sharing\\Command\\ExiprationNotification' => __DIR__.'/..'.'/../lib/Command/ExiprationNotification.php', |
|
| 41 | + 'OCA\\Files_Sharing\\Controller\\AcceptController' => __DIR__.'/..'.'/../lib/Controller/AcceptController.php', |
|
| 42 | + 'OCA\\Files_Sharing\\Controller\\DeletedShareAPIController' => __DIR__.'/..'.'/../lib/Controller/DeletedShareAPIController.php', |
|
| 43 | + 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => __DIR__.'/..'.'/../lib/Controller/ExternalSharesController.php', |
|
| 44 | + 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => __DIR__.'/..'.'/../lib/Controller/PublicPreviewController.php', |
|
| 45 | + 'OCA\\Files_Sharing\\Controller\\RemoteController' => __DIR__.'/..'.'/../lib/Controller/RemoteController.php', |
|
| 46 | + 'OCA\\Files_Sharing\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
| 47 | + 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => __DIR__.'/..'.'/../lib/Controller/ShareAPIController.php', |
|
| 48 | + 'OCA\\Files_Sharing\\Controller\\ShareController' => __DIR__.'/..'.'/../lib/Controller/ShareController.php', |
|
| 49 | + 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => __DIR__.'/..'.'/../lib/Controller/ShareInfoController.php', |
|
| 50 | + 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => __DIR__.'/..'.'/../lib/Controller/ShareesAPIController.php', |
|
| 51 | + 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => __DIR__.'/..'.'/../lib/DeleteOrphanedSharesJob.php', |
|
| 52 | + 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => __DIR__.'/..'.'/../lib/Exceptions/BrokenPath.php', |
|
| 53 | + 'OCA\\Files_Sharing\\Exceptions\\S2SException' => __DIR__.'/..'.'/../lib/Exceptions/S2SException.php', |
|
| 54 | + 'OCA\\Files_Sharing\\Exceptions\\SharingRightsException' => __DIR__.'/..'.'/../lib/Exceptions/SharingRightsException.php', |
|
| 55 | + 'OCA\\Files_Sharing\\ExpireSharesJob' => __DIR__.'/..'.'/../lib/ExpireSharesJob.php', |
|
| 56 | + 'OCA\\Files_Sharing\\External\\Cache' => __DIR__.'/..'.'/../lib/External/Cache.php', |
|
| 57 | + 'OCA\\Files_Sharing\\External\\Manager' => __DIR__.'/..'.'/../lib/External/Manager.php', |
|
| 58 | + 'OCA\\Files_Sharing\\External\\Mount' => __DIR__.'/..'.'/../lib/External/Mount.php', |
|
| 59 | + 'OCA\\Files_Sharing\\External\\MountProvider' => __DIR__.'/..'.'/../lib/External/MountProvider.php', |
|
| 60 | + 'OCA\\Files_Sharing\\External\\Scanner' => __DIR__.'/..'.'/../lib/External/Scanner.php', |
|
| 61 | + 'OCA\\Files_Sharing\\External\\Storage' => __DIR__.'/..'.'/../lib/External/Storage.php', |
|
| 62 | + 'OCA\\Files_Sharing\\External\\Watcher' => __DIR__.'/..'.'/../lib/External/Watcher.php', |
|
| 63 | + 'OCA\\Files_Sharing\\Helper' => __DIR__.'/..'.'/../lib/Helper.php', |
|
| 64 | + 'OCA\\Files_Sharing\\Hooks' => __DIR__.'/..'.'/../lib/Hooks.php', |
|
| 65 | + 'OCA\\Files_Sharing\\ISharedStorage' => __DIR__.'/..'.'/../lib/ISharedStorage.php', |
|
| 66 | + 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => __DIR__.'/..'.'/../lib/Listener/LoadAdditionalListener.php', |
|
| 67 | + 'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => __DIR__.'/..'.'/../lib/Listener/LoadSidebarListener.php', |
|
| 68 | + 'OCA\\Files_Sharing\\Listener\\UserAddedToGroupListener' => __DIR__.'/..'.'/../lib/Listener/UserAddedToGroupListener.php', |
|
| 69 | + 'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => __DIR__.'/..'.'/../lib/Listener/UserShareAcceptanceListener.php', |
|
| 70 | + 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => __DIR__.'/..'.'/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
| 71 | + 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => __DIR__.'/..'.'/../lib/Middleware/ShareInfoMiddleware.php', |
|
| 72 | + 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => __DIR__.'/..'.'/../lib/Middleware/SharingCheckMiddleware.php', |
|
| 73 | + 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => __DIR__.'/..'.'/../lib/Migration/OwncloudGuestShareType.php', |
|
| 74 | + 'OCA\\Files_Sharing\\Migration\\SetAcceptedStatus' => __DIR__.'/..'.'/../lib/Migration/SetAcceptedStatus.php', |
|
| 75 | + 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => __DIR__.'/..'.'/../lib/Migration/SetPasswordColumn.php', |
|
| 76 | + 'OCA\\Files_Sharing\\MountProvider' => __DIR__.'/..'.'/../lib/MountProvider.php', |
|
| 77 | + 'OCA\\Files_Sharing\\Notification\\Listener' => __DIR__.'/..'.'/../lib/Notification/Listener.php', |
|
| 78 | + 'OCA\\Files_Sharing\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
| 79 | + 'OCA\\Files_Sharing\\Scanner' => __DIR__.'/..'.'/../lib/Scanner.php', |
|
| 80 | + 'OCA\\Files_Sharing\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
| 81 | + 'OCA\\Files_Sharing\\ShareBackend\\File' => __DIR__.'/..'.'/../lib/ShareBackend/File.php', |
|
| 82 | + 'OCA\\Files_Sharing\\ShareBackend\\Folder' => __DIR__.'/..'.'/../lib/ShareBackend/Folder.php', |
|
| 83 | + 'OCA\\Files_Sharing\\SharedMount' => __DIR__.'/..'.'/../lib/SharedMount.php', |
|
| 84 | + 'OCA\\Files_Sharing\\SharedStorage' => __DIR__.'/..'.'/../lib/SharedStorage.php', |
|
| 85 | + 'OCA\\Files_Sharing\\Updater' => __DIR__.'/..'.'/../lib/Updater.php', |
|
| 86 | 86 | ); |
| 87 | 87 | |
| 88 | 88 | public static function getInitializer(ClassLoader $loader) |
| 89 | 89 | { |
| 90 | - return \Closure::bind(function () use ($loader) { |
|
| 90 | + return \Closure::bind(function() use ($loader) { |
|
| 91 | 91 | $loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Sharing::$prefixLengthsPsr4; |
| 92 | 92 | $loader->prefixDirsPsr4 = ComposerStaticInitFiles_Sharing::$prefixDirsPsr4; |
| 93 | 93 | $loader->classMap = ComposerStaticInitFiles_Sharing::$classMap; |