Expose internal expiration dates to JS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
0c0ca45d50
commit
efce1fdfac
|
@ -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([
|
||||
|
|
Loading…
Reference in New Issue