aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-08-20 09:00:03 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-08-20 09:00:03 +0200
commitf6578b74f43f5ef860c1850bc6c4c176d80135f5 (patch)
tree3e0113854c63b9a077c406d4095442cd903e09cf /apps/dashboard/lib
parent1f4c0299773f95032b2453041dd356b781b05988 (diff)
downloadnextcloud-server-f6578b74f43f5ef860c1850bc6c4c176d80135f5.tar.gz
nextcloud-server-f6578b74f43f5ef860c1850bc6c4c176d80135f5.zip
Allow using geolocation in the dashboard
Else the weather geolocation is kind of useless. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dashboard/lib')
-rw-r--r--apps/dashboard/lib/Controller/DashboardController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php
index 40ed026b82b..8f845ca9b6a 100644
--- a/apps/dashboard/lib/Controller/DashboardController.php
+++ b/apps/dashboard/lib/Controller/DashboardController.php
@@ -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;
}
/**