summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-13 10:08:20 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 14:33:13 +0100
commitefce1fdfaca81353414c2a752dcebfa3ca4135e6 (patch)
tree4f5388ac245e5a4396b45dd0a329cf8d9f7d94c5 /lib
parent0c0ca45d5080085db4ed380b47c1dbbbf94f6119 (diff)
downloadnextcloud-server-efce1fdfaca81353414c2a752dcebfa3ca4135e6.tar.gz
nextcloud-server-efce1fdfaca81353414c2a752dcebfa3ca4135e6.zip
Expose internal expiration dates to JS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Template/JSConfigHelper.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index df5eda9121b..065bf2545e0 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -149,6 +149,13 @@ class JSConfigHelper {
}
$outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
+ $defaultInternalExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no') === 'yes';
+ $defaultInternalExpireDate = $defaultInternalExpireDateEnforced = null;
+ if ($defaultInternalExpireDateEnabled) {
+ $defaultInternalExpireDate = (int) $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7');
+ $defaultInternalExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_internal_enforce_expire_date', 'no') === 'yes';
+ }
+
$countOfDataLocation = 0;
$dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
@@ -255,7 +262,10 @@ class JSConfigHelper {
'resharingAllowed' => \OC\Share\Share::isResharingAllowed(),
'remoteShareAllowed' => $outgoingServer2serverShareEnabled,
'federatedCloudShareDoc' => $this->urlGenerator->linkToDocs('user-sharing-federated'),
- 'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing()
+ 'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing(),
+ 'defaultInternalExpireDateEnabled' => $defaultInternalExpireDateEnabled,
+ 'defaultInternalExpireDate' => $defaultInternalExpireDate,
+ 'defaultInternalExpireDateEnforced' => $defaultInternalExpireDateEnforced,
]
]),
"_theme" => json_encode([