summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-03-20 19:22:38 +0100
committerGitHub <noreply@github.com>2019-03-20 19:22:38 +0100
commit03dc79f66561b1dbaba9c036c47f14697c065e0a (patch)
treef30bc648f217344d6565b1c4462c2d14b6a98906 /settings/Controller
parentb72d270a9b1d441b4ac3a93a91486ebda68a654f (diff)
parent942281a48e2791cf6c46de758985e62806bed363 (diff)
downloadnextcloud-server-03dc79f66561b1dbaba9c036c47f14697c065e0a.tar.gz
nextcloud-server-03dc79f66561b1dbaba9c036c47f14697c065e0a.zip
Merge pull request #14578 from nextcloud/enh/force_enable_apps
Force enable apps
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/AppSettingsController.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index 2842ead3eaa..788221f92a0 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -274,13 +274,17 @@ class AppSettingsController extends Controller {
$appData['licence'] = $appData['license'];
}
+ $ignoreMaxApps = $this->config->getSystemValue('app_install_overwrite', []);
+ $ignoreMax = in_array($appData['id'], $ignoreMaxApps);
+
// analyse dependencies
- $missing = $dependencyAnalyzer->analyze($appData);
+ $missing = $dependencyAnalyzer->analyze($appData, $ignoreMax);
$appData['canInstall'] = empty($missing);
$appData['missingDependencies'] = $missing;
$appData['missingMinOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['min-version']);
$appData['missingMaxOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['max-version']);
+ $appData['isCompatible'] = $dependencyAnalyzer->isMarkedCompatible($appData);
return $appData;
}, $apps);
@@ -315,6 +319,9 @@ class AppSettingsController extends Controller {
}
}
+ if (!isset($app['releases'][0]['rawPlatformVersionSpec'])) {
+ continue;
+ }
$nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']);
$nextCloudVersionDependencies = [];
if($nextCloudVersion->getMinimumVersion() !== '') {
@@ -544,4 +551,16 @@ class AppSettingsController extends Controller {
return ($a < $b) ? -1 : 1;
}
+ public function force(string $appId): JSONResponse {
+ $appId = OC_App::cleanAppId($appId);
+
+ $ignoreMaxApps = $this->config->getSystemValue('app_install_overwrite', []);
+ if (!in_array($appId, $ignoreMaxApps, true)) {
+ $ignoreMaxApps[] = $appId;
+ $this->config->setSystemValue('app_install_overwrite', $ignoreMaxApps);
+ }
+
+ return new JSONResponse();
+ }
+
}