From af61486aea90cfc1a82301ce624dffb59ed01e07 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 25 Mar 2021 17:32:49 +0100 Subject: Separate settings for remote share expiration Added separate settings for default and enforced expiration date for remote shares. Signed-off-by: Vincent Petry --- apps/files_sharing/lib/Capabilities.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index 72cd854591f..5a0b9d7e71d 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -86,6 +86,13 @@ class Capabilities implements ICapability { $public['expire_date_internal']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; } + $public['expire_date_remote'] = []; + $public['expire_date_remote']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_remote_expire_date', 'no') === 'yes'; + if ($public['expire_date_remote']['enabled']) { + $public['expire_date_remote']['days'] = $this->config->getAppValue('core', 'shareapi_remote_expire_after_n_days', '7'); + $public['expire_date_remote']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_remote_expire_date', 'no') === 'yes'; + } + $public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes'; $public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes'; $public['upload_files_drop'] = $public['upload']; -- cgit v1.2.3