diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-05-13 21:15:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 21:15:26 +0300 |
commit | f02ccc6d29d6357d9c2d493e00f3ee824ec5abb3 (patch) | |
tree | d53cb503b537c40207ade4a322d466c5ec26b24b /apps/settings | |
parent | 861a7870863c41df28882d8b5fec7cb5ce44a4b9 (diff) | |
parent | 9a131a1cf7fc0cc9fecd877b89ef03fb3e44edcc (diff) |
Merge pull request #32360 from nextcloud/backport/stable24/share_search_tweaks
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Sharing.php | 1 | ||||
-rw-r--r-- | apps/settings/src/admin.js | 1 | ||||
-rw-r--r-- | apps/settings/templates/settings/admin/sharing.php | 18 | ||||
-rw-r--r-- | apps/settings/tests/Settings/Admin/SharingTest.php | 4 |
4 files changed, 6 insertions, 18 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index 56c89c515a8..ffe1e5acd45 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -90,6 +90,7 @@ class Sharing implements IDelegatedSettings { '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'), + 'restrictUserEnumerationFullMatchEmail' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes'), 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no'), 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false), 'passwordExcludedGroups' => $excludedPasswordGroupsList, diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js index feb03a865b9..8012dcb8863 100644 --- a/apps/settings/src/admin.js +++ b/apps/settings/src/admin.js @@ -157,6 +157,7 @@ window.addEventListener('DOMContentLoaded', () => { $('#shareapi_restrict_user_enumeration_full_match').on('change', function() { $('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked) + $('#shareapi_restrict_user_enumeration_full_match_email_setting').toggleClass('hidden', !this.checked) $('#shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting').toggleClass('hidden', !this.checked) }) diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index 04c7f1aa3ae..67a846bcc0c 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -247,24 +247,6 @@ } ?> /> <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' || $_['restrictUserEnumerationFullMatch'] === '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 ($_['restrictUserEnumerationFullMatchUserId'] === '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 id="shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting" class="double-indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['restrictUserEnumerationFullMatch'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_restrict_user_enumeration_full_match_ignore_second_display_name" value="1" id="shareapi_restrict_user_enumeration_full_match_ignore_second_display_name" class="checkbox" - <?php if ($_['restrictUserEnumerationFullMatchIgnoreSecondDisplayName'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapi_restrict_user_enumeration_full_match_ignore_second_display_name"><?php p($l->t('Ignore second display name in parentheses if any (example: "First display name (second ignored display name)")'));?></label><br /> - </p> <p> <input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate" diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index e0693b4f963..4cb94632f02 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -84,6 +84,7 @@ class SharingTest extends TestCase { ['core', 'shareapi_restrict_user_enumeration_to_phone', 'no', 'no'], ['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'], + ['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'], ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'no'], @@ -119,6 +120,7 @@ class SharingTest extends TestCase { 'restrictUserEnumerationToPhone' => 'no', 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', + 'restrictUserEnumerationFullMatchEmail' => 'yes', 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, @@ -163,6 +165,7 @@ class SharingTest extends TestCase { ['core', 'shareapi_restrict_user_enumeration_to_phone', 'no', 'no'], ['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'], + ['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'], ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'no'], @@ -198,6 +201,7 @@ class SharingTest extends TestCase { 'restrictUserEnumerationToPhone' => 'no', 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', + 'restrictUserEnumerationFullMatchEmail' => 'yes', 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, |