summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-04-04 11:04:21 +0200
committerGitHub <noreply@github.com>2017-04-04 11:04:21 +0200
commitefb21a948e586d2080e179ce6b4b271132561ad7 (patch)
treec63d1d2cbb5b16abd65da5c683ddcf7c4ed2d34b /lib
parent0d69b52fde739776242fdc0780c0e90d7faefa23 (diff)
parent5e7197e49fa6eacb329386aa65e89a4f5d0c2014 (diff)
downloadnextcloud-server-efb21a948e586d2080e179ce6b4b271132561ad7.tar.gz
nextcloud-server-efb21a948e586d2080e179ce6b4b271132561ad7.zip
Merge pull request #4093 from nextcloud/endorse-password-protection
Endorse password protection
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Settings/Admin/Sharing.php1
-rw-r--r--lib/private/Template/JSConfigHelper.php4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Settings/Admin/Sharing.php b/lib/private/Settings/Admin/Sharing.php
index 9b17efa8028..8f57f77b20a 100644
--- a/lib/private/Settings/Admin/Sharing.php
+++ b/lib/private/Settings/Admin/Sharing.php
@@ -64,6 +64,7 @@ class Sharing implements ISettings {
'shareExcludeGroups' => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes' ? true : false,
'shareExcludedGroupsList' => $excludeGroupsList,
'publicShareDisclaimerText' => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null),
+ 'enableLinkPasswordByDefault' => $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'),
];
return new TemplateResponse('settings', 'admin/sharing', $parameters, '');
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index ca45bbee9c6..4fc21680211 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -112,6 +112,9 @@ class JSConfigHelper {
$apps_paths[$app] = \OC_App::getAppWebPath($app);
}
+
+ $enableLinkPasswordByDefault = $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no');
+ $enableLinkPasswordByDefault = ($enableLinkPasswordByDefault === 'yes') ? true : false;
$defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
$defaultExpireDate = $enforceDefaultExpireDate = null;
if ($defaultExpireDateEnabled) {
@@ -217,6 +220,7 @@ class JSConfigHelper {
'defaultExpireDate' => $defaultExpireDate,
'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
+ 'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault,
'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
'resharingAllowed' => \OCP\Share::isResharingAllowed(),
'remoteShareAllowed' => $outgoingServer2serverShareEnabled,