Merge pull request #15461 from nextcloud/askForPasswordCapability

add "askForPassword" on capabilities for sharing
This commit is contained in:
Morris Jobke 2019-05-13 21:16:59 +02:00 committed by GitHub
commit 8001c89f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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';