AppSettingsController.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Settings\Controller;
  8. use OC\App\AppStore\Bundles\BundleFetcher;
  9. use OC\App\AppStore\Fetcher\AppDiscoverFetcher;
  10. use OC\App\AppStore\Fetcher\AppFetcher;
  11. use OC\App\AppStore\Fetcher\CategoryFetcher;
  12. use OC\App\AppStore\Version\VersionParser;
  13. use OC\App\DependencyAnalyzer;
  14. use OC\App\Platform;
  15. use OC\Installer;
  16. use OCP\App\AppPathNotFoundException;
  17. use OCP\App\IAppManager;
  18. use OCP\AppFramework\Controller;
  19. use OCP\AppFramework\Http;
  20. use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
  21. use OCP\AppFramework\Http\Attribute\OpenAPI;
  22. use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
  23. use OCP\AppFramework\Http\Attribute\PublicPage;
  24. use OCP\AppFramework\Http\ContentSecurityPolicy;
  25. use OCP\AppFramework\Http\FileDisplayResponse;
  26. use OCP\AppFramework\Http\JSONResponse;
  27. use OCP\AppFramework\Http\NotFoundResponse;
  28. use OCP\AppFramework\Http\Response;
  29. use OCP\AppFramework\Http\TemplateResponse;
  30. use OCP\AppFramework\Services\IInitialState;
  31. use OCP\Files\AppData\IAppDataFactory;
  32. use OCP\Files\IAppData;
  33. use OCP\Files\NotFoundException;
  34. use OCP\Files\NotPermittedException;
  35. use OCP\Files\SimpleFS\ISimpleFile;
  36. use OCP\Files\SimpleFS\ISimpleFolder;
  37. use OCP\Http\Client\IClientService;
  38. use OCP\IConfig;
  39. use OCP\IL10N;
  40. use OCP\INavigationManager;
  41. use OCP\IRequest;
  42. use OCP\IURLGenerator;
  43. use OCP\L10N\IFactory;
  44. use Psr\Log\LoggerInterface;
  45. #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
  46. class AppSettingsController extends Controller {
  47. /** @var array */
  48. private $allApps = [];
  49. private IAppData $appData;
  50. public function __construct(
  51. string $appName,
  52. IRequest $request,
  53. IAppDataFactory $appDataFactory,
  54. private IL10N $l10n,
  55. private IConfig $config,
  56. private INavigationManager $navigationManager,
  57. private IAppManager $appManager,
  58. private CategoryFetcher $categoryFetcher,
  59. private AppFetcher $appFetcher,
  60. private IFactory $l10nFactory,
  61. private BundleFetcher $bundleFetcher,
  62. private Installer $installer,
  63. private IURLGenerator $urlGenerator,
  64. private LoggerInterface $logger,
  65. private IInitialState $initialState,
  66. private AppDiscoverFetcher $discoverFetcher,
  67. private IClientService $clientService,
  68. ) {
  69. parent::__construct($appName, $request);
  70. $this->appData = $appDataFactory->get('appstore');
  71. }
  72. /**
  73. * @return TemplateResponse
  74. */
  75. #[NoCSRFRequired]
  76. public function viewApps(): TemplateResponse {
  77. $this->navigationManager->setActiveEntry('core_apps');
  78. $this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true));
  79. $this->initialState->provideInitialState('appstoreBundles', $this->getBundles());
  80. $this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual'));
  81. $this->initialState->provideInitialState('appstoreUpdateCount', count($this->getAppsWithUpdates()));
  82. $policy = new ContentSecurityPolicy();
  83. $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com');
  84. $templateResponse = new TemplateResponse('settings', 'settings/empty', ['pageTitle' => $this->l10n->t('Settings')]);
  85. $templateResponse->setContentSecurityPolicy($policy);
  86. \OCP\Util::addStyle('settings', 'settings');
  87. \OCP\Util::addScript('settings', 'vue-settings-apps-users-management');
  88. return $templateResponse;
  89. }
  90. /**
  91. * Get all active entries for the app discover section
  92. */
  93. #[NoCSRFRequired]
  94. public function getAppDiscoverJSON(): JSONResponse {
  95. $data = $this->discoverFetcher->get(true);
  96. return new JSONResponse(array_values($data));
  97. }
  98. /**
  99. * Get a image for the app discover section - this is proxied for privacy and CSP reasons
  100. *
  101. * @param string $image
  102. * @throws \Exception
  103. */
  104. #[PublicPage]
  105. #[NoCSRFRequired]
  106. public function getAppDiscoverMedia(string $fileName): Response {
  107. $etag = $this->discoverFetcher->getETag() ?? date('Y-m');
  108. $folder = null;
  109. try {
  110. $folder = $this->appData->getFolder('app-discover-cache');
  111. $this->cleanUpImageCache($folder, $etag);
  112. } catch (\Throwable $e) {
  113. $folder = $this->appData->newFolder('app-discover-cache');
  114. }
  115. // Get the current cache folder
  116. try {
  117. $folder = $folder->getFolder($etag);
  118. } catch (NotFoundException $e) {
  119. $folder = $folder->newFolder($etag);
  120. }
  121. $info = pathinfo($fileName);
  122. $hashName = md5($fileName);
  123. $allFiles = $folder->getDirectoryListing();
  124. // Try to find the file
  125. $file = array_filter($allFiles, function (ISimpleFile $file) use ($hashName) {
  126. return str_starts_with($file->getName(), $hashName);
  127. });
  128. // Get the first entry
  129. $file = reset($file);
  130. // If not found request from Web
  131. if ($file === false) {
  132. try {
  133. $client = $this->clientService->newClient();
  134. $fileResponse = $client->get($fileName);
  135. $contentType = $fileResponse->getHeader('Content-Type');
  136. $extension = $info['extension'] ?? '';
  137. $file = $folder->newFile($hashName . '.' . base64_encode($contentType) . '.' . $extension, $fileResponse->getBody());
  138. } catch (\Throwable $e) {
  139. $this->logger->warning('Could not load media file for app discover section', ['media_src' => $fileName, 'exception' => $e]);
  140. return new NotFoundResponse();
  141. }
  142. } else {
  143. // File was found so we can get the content type from the file name
  144. $contentType = base64_decode(explode('.', $file->getName())[1] ?? '');
  145. }
  146. $response = new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => $contentType]);
  147. // cache for 7 days
  148. $response->cacheFor(604800, false, true);
  149. return $response;
  150. }
  151. /**
  152. * Remove orphaned folders from the image cache that do not match the current etag
  153. * @param ISimpleFolder $folder The folder to clear
  154. * @param string $etag The etag (directory name) to keep
  155. */
  156. private function cleanUpImageCache(ISimpleFolder $folder, string $etag): void {
  157. // Cleanup old cache folders
  158. $allFiles = $folder->getDirectoryListing();
  159. foreach ($allFiles as $dir) {
  160. try {
  161. if ($dir->getName() !== $etag) {
  162. $dir->delete();
  163. }
  164. } catch (NotPermittedException $e) {
  165. // ignore folder for now
  166. }
  167. }
  168. }
  169. private function getAppsWithUpdates() {
  170. $appClass = new \OC_App();
  171. $apps = $appClass->listAllApps();
  172. foreach ($apps as $key => $app) {
  173. $newVersion = $this->installer->isUpdateAvailable($app['id']);
  174. if ($newVersion === false) {
  175. unset($apps[$key]);
  176. }
  177. }
  178. return $apps;
  179. }
  180. private function getBundles() {
  181. $result = [];
  182. $bundles = $this->bundleFetcher->getBundles();
  183. foreach ($bundles as $bundle) {
  184. $result[] = [
  185. 'name' => $bundle->getName(),
  186. 'id' => $bundle->getIdentifier(),
  187. 'appIdentifiers' => $bundle->getAppIdentifiers()
  188. ];
  189. }
  190. return $result;
  191. }
  192. /**
  193. * Get all available categories
  194. *
  195. * @return JSONResponse
  196. */
  197. public function listCategories(): JSONResponse {
  198. return new JSONResponse($this->getAllCategories());
  199. }
  200. private function getAllCategories() {
  201. $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2);
  202. $categories = $this->categoryFetcher->get();
  203. return array_map(fn ($category) => [
  204. 'id' => $category['id'],
  205. 'displayName' => $category['translations'][$currentLanguage]['name'] ?? $category['translations']['en']['name'],
  206. ], $categories);
  207. }
  208. private function fetchApps() {
  209. $appClass = new \OC_App();
  210. $apps = $appClass->listAllApps();
  211. foreach ($apps as $app) {
  212. $app['installed'] = true;
  213. $this->allApps[$app['id']] = $app;
  214. }
  215. $apps = $this->getAppsForCategory('');
  216. $supportedApps = $appClass->getSupportedApps();
  217. foreach ($apps as $app) {
  218. $app['appstore'] = true;
  219. if (!array_key_exists($app['id'], $this->allApps)) {
  220. $this->allApps[$app['id']] = $app;
  221. } else {
  222. $this->allApps[$app['id']] = array_merge($app, $this->allApps[$app['id']]);
  223. }
  224. if (in_array($app['id'], $supportedApps)) {
  225. $this->allApps[$app['id']]['level'] = \OC_App::supportedApp;
  226. }
  227. }
  228. // add bundle information
  229. $bundles = $this->bundleFetcher->getBundles();
  230. foreach ($bundles as $bundle) {
  231. foreach ($bundle->getAppIdentifiers() as $identifier) {
  232. foreach ($this->allApps as &$app) {
  233. if ($app['id'] === $identifier) {
  234. $app['bundleIds'][] = $bundle->getIdentifier();
  235. continue;
  236. }
  237. }
  238. }
  239. }
  240. }
  241. private function getAllApps() {
  242. return $this->allApps;
  243. }
  244. /**
  245. * Get all available apps in a category
  246. *
  247. * @return JSONResponse
  248. * @throws \Exception
  249. */
  250. public function listApps(): JSONResponse {
  251. $this->fetchApps();
  252. $apps = $this->getAllApps();
  253. $dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n);
  254. $ignoreMaxApps = $this->config->getSystemValue('app_install_overwrite', []);
  255. if (!is_array($ignoreMaxApps)) {
  256. $this->logger->warning('The value given for app_install_overwrite is not an array. Ignoring...');
  257. $ignoreMaxApps = [];
  258. }
  259. // Extend existing app details
  260. $apps = array_map(function (array $appData) use ($dependencyAnalyzer, $ignoreMaxApps) {
  261. if (isset($appData['appstoreData'])) {
  262. $appstoreData = $appData['appstoreData'];
  263. $appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($appstoreData['screenshots'][0]['url']) : '';
  264. $appData['category'] = $appstoreData['categories'];
  265. $appData['releases'] = $appstoreData['releases'];
  266. }
  267. $newVersion = $this->installer->isUpdateAvailable($appData['id']);
  268. if ($newVersion) {
  269. $appData['update'] = $newVersion;
  270. }
  271. // fix groups to be an array
  272. $groups = [];
  273. if (is_string($appData['groups'])) {
  274. $groups = json_decode($appData['groups']);
  275. }
  276. $appData['groups'] = $groups;
  277. $appData['canUnInstall'] = !$appData['active'] && $appData['removable'];
  278. // fix licence vs license
  279. if (isset($appData['license']) && !isset($appData['licence'])) {
  280. $appData['licence'] = $appData['license'];
  281. }
  282. $ignoreMax = in_array($appData['id'], $ignoreMaxApps);
  283. // analyse dependencies
  284. $missing = $dependencyAnalyzer->analyze($appData, $ignoreMax);
  285. $appData['canInstall'] = empty($missing);
  286. $appData['missingDependencies'] = $missing;
  287. $appData['missingMinOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['min-version']);
  288. $appData['missingMaxOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['max-version']);
  289. $appData['isCompatible'] = $dependencyAnalyzer->isMarkedCompatible($appData);
  290. return $appData;
  291. }, $apps);
  292. usort($apps, [$this, 'sortApps']);
  293. return new JSONResponse(['apps' => $apps, 'status' => 'success']);
  294. }
  295. /**
  296. * Get all apps for a category from the app store
  297. *
  298. * @param string $requestedCategory
  299. * @return array
  300. * @throws \Exception
  301. */
  302. private function getAppsForCategory($requestedCategory = ''): array {
  303. $versionParser = new VersionParser();
  304. $formattedApps = [];
  305. $apps = $this->appFetcher->get();
  306. foreach ($apps as $app) {
  307. // Skip all apps not in the requested category
  308. if ($requestedCategory !== '') {
  309. $isInCategory = false;
  310. foreach ($app['categories'] as $category) {
  311. if ($category === $requestedCategory) {
  312. $isInCategory = true;
  313. }
  314. }
  315. if (!$isInCategory) {
  316. continue;
  317. }
  318. }
  319. if (!isset($app['releases'][0]['rawPlatformVersionSpec'])) {
  320. continue;
  321. }
  322. $nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']);
  323. $nextCloudVersionDependencies = [];
  324. if ($nextCloudVersion->getMinimumVersion() !== '') {
  325. $nextCloudVersionDependencies['nextcloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion();
  326. }
  327. if ($nextCloudVersion->getMaximumVersion() !== '') {
  328. $nextCloudVersionDependencies['nextcloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion();
  329. }
  330. $phpVersion = $versionParser->getVersion($app['releases'][0]['rawPhpVersionSpec']);
  331. try {
  332. $this->appManager->getAppPath($app['id']);
  333. $existsLocally = true;
  334. } catch (AppPathNotFoundException) {
  335. $existsLocally = false;
  336. }
  337. $phpDependencies = [];
  338. if ($phpVersion->getMinimumVersion() !== '') {
  339. $phpDependencies['php']['@attributes']['min-version'] = $phpVersion->getMinimumVersion();
  340. }
  341. if ($phpVersion->getMaximumVersion() !== '') {
  342. $phpDependencies['php']['@attributes']['max-version'] = $phpVersion->getMaximumVersion();
  343. }
  344. if (isset($app['releases'][0]['minIntSize'])) {
  345. $phpDependencies['php']['@attributes']['min-int-size'] = $app['releases'][0]['minIntSize'];
  346. }
  347. $authors = '';
  348. foreach ($app['authors'] as $key => $author) {
  349. $authors .= $author['name'];
  350. if ($key !== count($app['authors']) - 1) {
  351. $authors .= ', ';
  352. }
  353. }
  354. $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2);
  355. $enabledValue = $this->config->getAppValue($app['id'], 'enabled', 'no');
  356. $groups = null;
  357. if ($enabledValue !== 'no' && $enabledValue !== 'yes') {
  358. $groups = $enabledValue;
  359. }
  360. $currentVersion = '';
  361. if ($this->appManager->isInstalled($app['id'])) {
  362. $currentVersion = $this->appManager->getAppVersion($app['id']);
  363. } else {
  364. $currentVersion = $app['releases'][0]['version'];
  365. }
  366. $formattedApps[] = [
  367. 'id' => $app['id'],
  368. 'name' => $app['translations'][$currentLanguage]['name'] ?? $app['translations']['en']['name'],
  369. 'description' => $app['translations'][$currentLanguage]['description'] ?? $app['translations']['en']['description'],
  370. 'summary' => $app['translations'][$currentLanguage]['summary'] ?? $app['translations']['en']['summary'],
  371. 'license' => $app['releases'][0]['licenses'],
  372. 'author' => $authors,
  373. 'shipped' => false,
  374. 'version' => $currentVersion,
  375. 'default_enable' => '',
  376. 'types' => [],
  377. 'documentation' => [
  378. 'admin' => $app['adminDocs'],
  379. 'user' => $app['userDocs'],
  380. 'developer' => $app['developerDocs']
  381. ],
  382. 'website' => $app['website'],
  383. 'bugs' => $app['issueTracker'],
  384. 'detailpage' => $app['website'],
  385. 'dependencies' => array_merge(
  386. $nextCloudVersionDependencies,
  387. $phpDependencies
  388. ),
  389. 'level' => ($app['isFeatured'] === true) ? 200 : 100,
  390. 'missingMaxOwnCloudVersion' => false,
  391. 'missingMinOwnCloudVersion' => false,
  392. 'canInstall' => true,
  393. 'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($app['screenshots'][0]['url']) : '',
  394. 'score' => $app['ratingOverall'],
  395. 'ratingNumOverall' => $app['ratingNumOverall'],
  396. 'ratingNumThresholdReached' => $app['ratingNumOverall'] > 5,
  397. 'removable' => $existsLocally,
  398. 'active' => $this->appManager->isEnabledForUser($app['id']),
  399. 'needsDownload' => !$existsLocally,
  400. 'groups' => $groups,
  401. 'fromAppStore' => true,
  402. 'appstoreData' => $app,
  403. ];
  404. }
  405. return $formattedApps;
  406. }
  407. /**
  408. * @param string $appId
  409. * @param array $groups
  410. * @return JSONResponse
  411. */
  412. #[PasswordConfirmationRequired]
  413. public function enableApp(string $appId, array $groups = []): JSONResponse {
  414. return $this->enableApps([$appId], $groups);
  415. }
  416. /**
  417. * Enable one or more apps
  418. *
  419. * apps will be enabled for specific groups only if $groups is defined
  420. *
  421. * @param array $appIds
  422. * @param array $groups
  423. * @return JSONResponse
  424. */
  425. #[PasswordConfirmationRequired]
  426. public function enableApps(array $appIds, array $groups = []): JSONResponse {
  427. try {
  428. $updateRequired = false;
  429. foreach ($appIds as $appId) {
  430. $appId = $this->appManager->cleanAppId($appId);
  431. // Check if app is already downloaded
  432. /** @var Installer $installer */
  433. $installer = \OC::$server->get(Installer::class);
  434. $isDownloaded = $installer->isDownloaded($appId);
  435. if (!$isDownloaded) {
  436. $installer->downloadApp($appId);
  437. }
  438. $installer->installApp($appId);
  439. if (count($groups) > 0) {
  440. $this->appManager->enableAppForGroups($appId, $this->getGroupList($groups));
  441. } else {
  442. $this->appManager->enableApp($appId);
  443. }
  444. if (\OC_App::shouldUpgrade($appId)) {
  445. $updateRequired = true;
  446. }
  447. }
  448. return new JSONResponse(['data' => ['update_required' => $updateRequired]]);
  449. } catch (\Throwable $e) {
  450. $this->logger->error('could not enable apps', ['exception' => $e]);
  451. return new JSONResponse(['data' => ['message' => $e->getMessage()]], Http::STATUS_INTERNAL_SERVER_ERROR);
  452. }
  453. }
  454. private function getGroupList(array $groups) {
  455. $groupManager = \OC::$server->getGroupManager();
  456. $groupsList = [];
  457. foreach ($groups as $group) {
  458. $groupItem = $groupManager->get($group);
  459. if ($groupItem instanceof \OCP\IGroup) {
  460. $groupsList[] = $groupManager->get($group);
  461. }
  462. }
  463. return $groupsList;
  464. }
  465. /**
  466. * @param string $appId
  467. * @return JSONResponse
  468. */
  469. #[PasswordConfirmationRequired]
  470. public function disableApp(string $appId): JSONResponse {
  471. return $this->disableApps([$appId]);
  472. }
  473. /**
  474. * @param array $appIds
  475. * @return JSONResponse
  476. */
  477. #[PasswordConfirmationRequired]
  478. public function disableApps(array $appIds): JSONResponse {
  479. try {
  480. foreach ($appIds as $appId) {
  481. $appId = $this->appManager->cleanAppId($appId);
  482. $this->appManager->disableApp($appId);
  483. }
  484. return new JSONResponse([]);
  485. } catch (\Exception $e) {
  486. $this->logger->error('could not disable app', ['exception' => $e]);
  487. return new JSONResponse(['data' => ['message' => $e->getMessage()]], Http::STATUS_INTERNAL_SERVER_ERROR);
  488. }
  489. }
  490. /**
  491. * @param string $appId
  492. * @return JSONResponse
  493. */
  494. #[PasswordConfirmationRequired]
  495. public function uninstallApp(string $appId): JSONResponse {
  496. $appId = $this->appManager->cleanAppId($appId);
  497. $result = $this->installer->removeApp($appId);
  498. if ($result !== false) {
  499. $this->appManager->clearAppsCache();
  500. return new JSONResponse(['data' => ['appid' => $appId]]);
  501. }
  502. return new JSONResponse(['data' => ['message' => $this->l10n->t('Could not remove app.')]], Http::STATUS_INTERNAL_SERVER_ERROR);
  503. }
  504. /**
  505. * @param string $appId
  506. * @return JSONResponse
  507. */
  508. public function updateApp(string $appId): JSONResponse {
  509. $appId = $this->appManager->cleanAppId($appId);
  510. $this->config->setSystemValue('maintenance', true);
  511. try {
  512. $result = $this->installer->updateAppstoreApp($appId);
  513. $this->config->setSystemValue('maintenance', false);
  514. } catch (\Exception $ex) {
  515. $this->config->setSystemValue('maintenance', false);
  516. return new JSONResponse(['data' => ['message' => $ex->getMessage()]], Http::STATUS_INTERNAL_SERVER_ERROR);
  517. }
  518. if ($result !== false) {
  519. return new JSONResponse(['data' => ['appid' => $appId]]);
  520. }
  521. return new JSONResponse(['data' => ['message' => $this->l10n->t('Could not update app.')]], Http::STATUS_INTERNAL_SERVER_ERROR);
  522. }
  523. private function sortApps($a, $b) {
  524. $a = (string)$a['name'];
  525. $b = (string)$b['name'];
  526. if ($a === $b) {
  527. return 0;
  528. }
  529. return ($a < $b) ? -1 : 1;
  530. }
  531. public function force(string $appId): JSONResponse {
  532. $appId = $this->appManager->cleanAppId($appId);
  533. $this->appManager->ignoreNextcloudRequirementForApp($appId);
  534. return new JSONResponse();
  535. }
  536. }