diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-21 11:44:17 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-21 11:44:17 +0300 |
commit | 91081c41a0e30fc8270192a4e1cc41608d6769ae (patch) | |
tree | d3c79b9826b098eea256136ed9e3a492875b0ecb /lib | |
parent | 98dd5ef68c970e892e62cf828bb5fb7926ce9acf (diff) |
Add a privacy policy link if it's set
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Settings/WhoHasAccessSettings.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Settings/WhoHasAccessSettings.php b/lib/Settings/WhoHasAccessSettings.php index 69422c6..cd39a4e 100644 --- a/lib/Settings/WhoHasAccessSettings.php +++ b/lib/Settings/WhoHasAccessSettings.php @@ -21,6 +21,8 @@ */ namespace OCA\Privacy\Settings; +use OC; +use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Http\TemplateResponse; use OCP\Settings\ISettings; @@ -35,7 +37,16 @@ class WhoHasAccessSettings implements ISettings { * @return TemplateResponse */ public function getForm():TemplateResponse { - return new TemplateResponse('privacy', 'who-has-access'); + $themingDefaults = OC::$server->getThemingDefaults(); + if ($themingDefaults instanceof ThemingDefaults) { + $privacyPolicyUrl = $themingDefaults->getPrivacyUrl(); + } else { + $privacyPolicyUrl = null; + } + + return new TemplateResponse('privacy', 'who-has-access', [ + 'privacyPolicyUrl' => $privacyPolicyUrl, + ]); } /** |