diff options
Diffstat (limited to 'lib/Settings/WhoHasAccessSettings.php')
-rw-r--r-- | lib/Settings/WhoHasAccessSettings.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Settings/WhoHasAccessSettings.php b/lib/Settings/WhoHasAccessSettings.php index cd39a4e..64aeaeb 100644 --- a/lib/Settings/WhoHasAccessSettings.php +++ b/lib/Settings/WhoHasAccessSettings.php @@ -24,6 +24,8 @@ namespace OCA\Privacy\Settings; use OC; use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IConfig; +use OCP\Encryption\IManager as IEncryptionManager; use OCP\Settings\ISettings; /** @@ -33,6 +35,24 @@ use OCP\Settings\ISettings; */ class WhoHasAccessSettings implements ISettings { + /** @var IConfig */ + private $config; + + /** @var IEncryptionManager */ + private $encryptionManager; + + /** + * WhoHasAccessSettings constructor. + * + * @param IConfig $config + * @param IEncryptionManager $manager + */ + public function __construct(IConfig $config, IEncryptionManager $manager) { + $this->config = $config; + $this->encryptionManager = $manager; + + } + /** * @return TemplateResponse */ @@ -44,8 +64,13 @@ class WhoHasAccessSettings implements ISettings { $privacyPolicyUrl = null; } + $fullDiskEncryption = $this->config->getAppValue('privacy', 'fullDiskEncryptionEnabled', '0'); + $serverSideEncryption = $this->encryptionManager->isEnabled(); + return new TemplateResponse('privacy', 'who-has-access', [ 'privacyPolicyUrl' => $privacyPolicyUrl, + 'fullDiskEncryptionEnabled' => $fullDiskEncryption, + 'serverSideEncryptionEnabled' => $serverSideEncryption ? '1' : '0', ]); } |