Fix default values of sharing capabilities
The problem is the UI used a different default than the capabilities. So when you never touched the config, the setting in admins said "disabled" while the capabilities said "enabled".
This commit is contained in:
parent
55dc74bba4
commit
70504920e7
|
@ -49,20 +49,20 @@ class Capabilities implements ICapability {
|
|||
$public['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes';
|
||||
if ($public['enabled']) {
|
||||
$public['password'] = [];
|
||||
$public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'yes') === 'yes');
|
||||
$public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes');
|
||||
|
||||
$public['expire_date'] = [];
|
||||
$public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'yes') === 'yes';
|
||||
$public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
|
||||
if ($public['expire_date']['enabled']) {
|
||||
$public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
|
||||
$public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'yes') === 'yes';
|
||||
$public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
|
||||
}
|
||||
|
||||
$public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'yes') === 'yes';
|
||||
$public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes';
|
||||
}
|
||||
$res["public"] = $public;
|
||||
|
||||
$res['user']['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'yes') === 'yes';
|
||||
$res['user']['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no') === 'yes';
|
||||
|
||||
$res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes';
|
||||
|
||||
|
|
Loading…
Reference in New Issue