diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-03-25 17:32:49 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-04-15 10:06:09 +0200 |
commit | af61486aea90cfc1a82301ce624dffb59ed01e07 (patch) | |
tree | 9b608272439503e0015ece40ae4b77013eabc81f /apps/files_sharing/lib | |
parent | 2650da70caa73c8bf3119edebb37e91d67f3a214 (diff) | |
download | nextcloud-server-af61486aea90cfc1a82301ce624dffb59ed01e07.tar.gz nextcloud-server-af61486aea90cfc1a82301ce624dffb59ed01e07.zip |
Separate settings for remote share expiration
Added separate settings for default and enforced expiration date for
remote shares.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php | 7 |
1 files changed, 7 insertions, 0 deletions
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']; |