aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/lib/Settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sharebymail/lib/Settings.php')
-rw-r--r--apps/sharebymail/lib/Settings.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/sharebymail/lib/Settings.php b/apps/sharebymail/lib/Settings.php
index 4ab1622425b..e032bc43ff1 100644
--- a/apps/sharebymail/lib/Settings.php
+++ b/apps/sharebymail/lib/Settings.php
@@ -23,8 +23,17 @@
namespace OCA\ShareByMail;
+use OCA\ShareByMail\Settings\SettingsManager;
+
class Settings {
+ /** @var SettingsManager */
+ private $settingsManager;
+
+ public function __construct(SettingsManager $settingsManager) {
+ $this->settingsManager = $settingsManager;
+ }
+
/**
* announce that the share-by-mail share provider is enabled
*
@@ -35,4 +44,10 @@ class Settings {
$array['shareByMailEnabled'] = true;
$settings['array']['oc_appconfig'] = json_encode($array);
}
+
+ public function announceShareByMailSettings(array $settings) {
+ $array = json_decode($settings['array']['oc_appconfig'], true);
+ $array['shareByMail']['enforcePasswordProtection'] = $this->settingsManager->enforcePasswordProtection();
+ $settings['array']['oc_appconfig'] = json_encode($array);
+ }
}