Merge pull request #22313 from nextcloud/fix/dashboard/geolocation

Allow using geolocation in the dashboard
This commit is contained in:
Morris Jobke 2020-08-20 10:22:59 +02:00 committed by GitHub
commit 6e5d7e40a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -111,7 +111,14 @@ class DashboardController extends Controller {
$this->inititalStateService->provideInitialState('dashboard', 'version', $this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', 0));
$this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0');
return new TemplateResponse('dashboard', 'index');
$response = new TemplateResponse('dashboard', 'index');
// For the weather widget we should allow the geolocation
$featurePolicy = new Http\FeaturePolicy();
$featurePolicy->addAllowedGeoLocationDomain('\'self\'');
$response->setFeaturePolicy($featurePolicy);
return $response;
}
/**