Skip to content

Commit a87cb02

Browse files
artongebackportbot-nextcloud[bot]
authored andcommitted
Rename setting name to reduce its length
Signed-off-by: Louis Chemineau <[email protected]>
1 parent 46fd400 commit a87cb02

File tree

7 files changed

+9
-15
lines changed

7 files changed

+9
-15
lines changed

apps/settings/lib/Settings/Admin/Sharing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function getForm() {
9191
'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'),
9292
'restrictUserEnumerationFullMatchUserId' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'),
9393
'restrictUserEnumerationFullMatchEmail' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes'),
94-
'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no'),
94+
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no'),
9595
'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false),
9696
'passwordExcludedGroups' => $excludedPasswordGroupsList,
9797
'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),

apps/settings/src/admin.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,6 @@ window.addEventListener('DOMContentLoaded', () => {
155155
$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)
156156
})
157157

158-
$('#shareapi_restrict_user_enumeration_full_match').on('change', function() {
159-
$('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked)
160-
$('#shareapi_restrict_user_enumeration_full_match_email_setting').toggleClass('hidden', !this.checked)
161-
$('#shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting').toggleClass('hidden', !this.checked)
162-
})
163-
164158
$('#allowLinks').change(function() {
165159
$('#publicLinkSettings').toggleClass('hidden', !this.checked)
166160
$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))

apps/settings/tests/Settings/Admin/SharingTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testGetFormWithoutExcludedGroups(): void {
8585
['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'],
8686
['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'],
8787
['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'],
88-
['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'],
88+
['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'],
8989
['core', 'shareapi_enabled', 'yes', 'yes'],
9090
['core', 'shareapi_default_expire_date', 'no', 'no'],
9191
['core', 'shareapi_expire_after_n_days', '7', '7'],
@@ -121,7 +121,7 @@ public function testGetFormWithoutExcludedGroups(): void {
121121
'restrictUserEnumerationFullMatch' => 'yes',
122122
'restrictUserEnumerationFullMatchUserId' => 'yes',
123123
'restrictUserEnumerationFullMatchEmail' => 'yes',
124-
'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no',
124+
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
125125
'enforceLinkPassword' => false,
126126
'onlyShareWithGroupMembers' => false,
127127
'shareAPIEnabled' => 'yes',
@@ -166,7 +166,7 @@ public function testGetFormWithExcludedGroups(): void {
166166
['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'],
167167
['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'],
168168
['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'],
169-
['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'],
169+
['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'],
170170
['core', 'shareapi_enabled', 'yes', 'yes'],
171171
['core', 'shareapi_default_expire_date', 'no', 'no'],
172172
['core', 'shareapi_expire_after_n_days', '7', '7'],
@@ -202,7 +202,7 @@ public function testGetFormWithExcludedGroups(): void {
202202
'restrictUserEnumerationFullMatch' => 'yes',
203203
'restrictUserEnumerationFullMatchUserId' => 'yes',
204204
'restrictUserEnumerationFullMatchEmail' => 'yes',
205-
'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no',
205+
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
206206
'enforceLinkPassword' => false,
207207
'onlyShareWithGroupMembers' => false,
208208
'shareAPIEnabled' => 'yes',

build/integration/features/bootstrap/CollaborationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function resetAppConfigs(): void {
124124
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match');
125125
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_userid');
126126
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_email');
127-
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name');
127+
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn');
128128
$this->deleteServerConfig('core', 'shareapi_only_share_with_group_members');
129129
}
130130

lib/private/Collaboration/Collaborators/UserPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function __construct(IConfig $config,
9595
$this->shareeEnumerationFullMatch = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes';
9696
$this->shareeEnumerationFullMatchUserId = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes';
9797
$this->shareeEnumerationFullMatchEmail = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes';
98-
$this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes';
98+
$this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';
9999
}
100100

101101
public function search($search, $limit, $offset, ISearchResult $searchResult) {

lib/private/Share20/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ public function matchEmail(): bool {
19681968
}
19691969

19701970
public function ignoreSecondDisplayName(): bool {
1971-
return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes';
1971+
return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';
19721972
}
19731973

19741974
public function currentUserCanEnumerateTargetUser(?IUser $currentUser, IUser $targetUser): bool {

tests/lib/Collaboration/Collaborators/UserPluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ public function dataSearchEnumeration() {
657657
[
658658
'core' => [
659659
'shareapi_allow_share_dialog_user_enumeration' => 'no',
660-
'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name' => 'yes',
660+
'shareapi_restrict_user_enumeration_full_match_ignore_second_dn' => 'yes',
661661
],
662662
]
663663
],

0 commit comments

Comments
 (0)