Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-04-11 11:27:59 +0300
committerGitHub <noreply@github.com>2022-04-11 11:27:59 +0300
commitcde260577e90dc7f3aea1d610ae6c2b93e949af5 (patch)
treeab46a2129ace4a8046d604fe675c657c653aad6a /apps/settings
parente36233dbab7995c4b2e037828ccb168005e5d76f (diff)
parent0e06ee68c0af2a953a5b32865c48a8bdfa6396b3 (diff)
Merge pull request #31857 from nextcloud/feat/dont_match_userid
Add settings to not match userID during full match
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Settings/Admin/Sharing.php1
-rw-r--r--apps/settings/src/admin.js4
-rw-r--r--apps/settings/templates/settings/admin/sharing.php11
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>