Load marked and return proper Template with CSP

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-05-23 19:50:42 +02:00
parent a8a655b1c0
commit eccc391bda
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
2 changed files with 2 additions and 2 deletions

View file

@ -139,6 +139,7 @@ class AppSettingsController extends Controller {
$category = 'installed';
}
\OC_Util::addVendorScript('core', 'marked/marked.min');
$params = [];
$params['category'] = $category;
$params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true;
@ -146,12 +147,11 @@ class AppSettingsController extends Controller {
$params['updateCount'] = count($this->getAppsWithUpdates());
$this->navigationManager->setActiveEntry('core_apps');
$templateResponse = new TemplateResponse($this->appName, 'apps', $params, 'user');
$templateResponse = new TemplateResponse('settings', 'settings', ['serverData' => $params]);
$policy = new ContentSecurityPolicy();
$policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com');
$templateResponse->setContentSecurityPolicy($policy);
return new TemplateResponse('settings', 'settings', ['serverData' => $params]);
return $templateResponse;
}