diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2019-05-09 10:39:39 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-05-13 20:09:00 +0200 |
commit | b65a59568ed9048111dba812a51efcfad982827a (patch) | |
tree | fc4e847b515c387126ee2b6ea266ed788694fbb5 /apps/files_sharing | |
parent | 4cd7900d4f4c0755244a20b8340002bdc8c9a2af (diff) | |
download | nextcloud-server-b65a59568ed9048111dba812a51efcfad982827a.tar.gz nextcloud-server-b65a59568ed9048111dba812a51efcfad982827a.zip |
add "askForPassword" on capabilities for sharing
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index a849dc4c9de..7c0478fa7c1 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -62,6 +62,12 @@ class Capabilities implements ICapability { $public['password'] = []; $public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes'); + if ($public['password']['enforced']) { + $public['password']['askForOptionalPassword'] = false; + } else { + $public['password']['askForOptionalPassword'] = ($this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no') === 'yes'); + } + $public['expire_date'] = []; $public['multiple_links'] = true; $public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |