@@ -59,7 +59,7 @@ |
||
| 59 | 59 | /** |
| 60 | 60 | * Middleware |
| 61 | 61 | */ |
| 62 | - $container->registerService('ShareMiddleware', function($c){ |
|
| 62 | + $container->registerService('ShareMiddleware', function($c) { |
|
| 63 | 63 | return new ShareMiddleware($c->query('SettingsService')); |
| 64 | 64 | }); |
| 65 | 65 | $container->registerMiddleware('ShareMiddleware'); |
@@ -12,16 +12,16 @@ |
||
| 12 | 12 | |
| 13 | 13 | private $settings; |
| 14 | 14 | |
| 15 | - public function __construct(SettingsService $config){ |
|
| 15 | + public function __construct(SettingsService $config) { |
|
| 16 | 16 | $this->settings = $config; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | public function beforeController($controller, $methodName) { |
| 21 | - if ($controller instanceof ShareController){ |
|
| 21 | + if ($controller instanceof ShareController) { |
|
| 22 | 22 | $setting = ($methodName === 'createPublicShare') ? 'link_sharing_enabled' : 'user_sharing_enabled'; |
| 23 | 23 | $http_response_code = \OCP\AppFramework\Http::STATUS_FORBIDDEN; |
| 24 | - if($methodName === 'getVaultItems'){ |
|
| 24 | + if($methodName === 'getVaultItems') { |
|
| 25 | 25 | $http_response_code = Http::STATUS_OK; |
| 26 | 26 | } |
| 27 | 27 | if (!$this->settings->isEnabled($setting)) { |