diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-10 18:36:23 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-20 16:33:26 +0200 |
commit | d8dcd72118f7f5f83874e3a54a7fbc02bda10ce6 (patch) | |
tree | 7da5dbe03601c1c52398b4a32460e5aad0dadf11 /apps/sharebymail/lib/Settings.php | |
parent | 140580f9d8468b8450f31dca997916a07693277f (diff) | |
download | nextcloud-server-d8dcd72118f7f5f83874e3a54a7fbc02bda10ce6.tar.gz nextcloud-server-d8dcd72118f7f5f83874e3a54a7fbc02bda10ce6.zip |
allow admin to enforce password on mail shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/sharebymail/lib/Settings.php')
-rw-r--r-- | apps/sharebymail/lib/Settings.php | 15 |
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); + } } |