diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Sharing.php | 1 | ||||
-rw-r--r-- | apps/settings/src/admin.js | 4 | ||||
-rw-r--r-- | apps/settings/templates/settings/admin/sharing.php | 11 |
3 files changed, 15 insertions, 1 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index a5f85003fa4..d2c3e907b3e 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -89,6 +89,7 @@ class Sharing implements IDelegatedSettings { 'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'), 'restrictUserEnumerationToPhone' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no'), 'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'), + 'restrictUserEnumerationFullMatchUserId' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'), 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false), 'passwordExcludedGroups' => $excludedPasswordGroupsList, 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false), diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js index c3704eed42c..ee7b4b6b202 100644 --- a/apps/settings/src/admin.js +++ b/apps/settings/src/admin.js @@ -155,6 +155,10 @@ window.addEventListener('DOMContentLoaded', () => { $('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked) }) + $('#shareapi_restrict_user_enumeration_full_match').on('change', function() { + $('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked) + }) + $('#allowLinks').change(function() { $('#publicLinkSettings').toggleClass('hidden', !this.checked) $('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked)) diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index b51f9339166..09918d4bc64 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -245,7 +245,16 @@ <?php if ($_['restrictUserEnumerationFullMatch'] === 'yes') { print_unescaped('checked="checked"'); } ?> /> - <label for="shareapi_restrict_user_enumeration_full_match"><?php p($l->t('Allow username autocompletion when entering the full name or email address (ignoring missing phonebook match and being in the same group)'));?></label><br /> + <label for="shareapi_restrict_user_enumeration_full_match"><?php p($l->t('Allow autocompletion when entering the full name or email address (ignoring missing phonebook match and being in the same group)'));?></label><br /> + </p> + <p id="shareapi_restrict_user_enumeration_full_match_userid_setting" class="double-indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['restrictUserEnumerationFullMatchUserId'] === 'no') { + p('hidden'); +}?>"> + <input type="checkbox" name="shareapi_restrict_user_enumeration_full_match_userid" value="1" id="shareapi_restrict_user_enumeration_full_match_userid" class="checkbox" + <?php if ($_['shareeEnumerationFullMatchUserId'] === 'yes') { + print_unescaped('checked="checked"'); +} ?> /> + <label for="shareapi_restrict_user_enumeration_full_match_userid"><?php p($l->t('Match username when restricting to full match'));?></label><br /> </p> <p> |