Rename setting name to reduce its length

Signed-off-by: Louis Chemineau <louis@chmn.me>
pull/32998/head
Louis Chemineau 2 years ago
parent 3ebde2f6c2
commit 347ca20f4e

@ -91,7 +91,7 @@ class Sharing implements IDelegatedSettings {
'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'),
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no'),
'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false),
'passwordExcludedGroups' => $excludedPasswordGroupsList,
'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),

@ -139,12 +139,6 @@ 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)
$('#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)
})
$('#allowLinks').change(function() {
$('#publicLinkSettings').toggleClass('hidden', !this.checked)
$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))

@ -85,7 +85,7 @@ class SharingTest extends TestCase {
['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_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'],
['core', 'shareapi_enabled', 'yes', 'yes'],
['core', 'shareapi_default_expire_date', 'no', 'no'],
['core', 'shareapi_expire_after_n_days', '7', '7'],
@ -121,7 +121,7 @@ class SharingTest extends TestCase {
'restrictUserEnumerationFullMatch' => 'yes',
'restrictUserEnumerationFullMatchUserId' => 'yes',
'restrictUserEnumerationFullMatchEmail' => 'yes',
'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no',
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
'enforceLinkPassword' => false,
'onlyShareWithGroupMembers' => false,
'shareAPIEnabled' => 'yes',
@ -166,7 +166,7 @@ class SharingTest extends TestCase {
['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_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'],
['core', 'shareapi_enabled', 'yes', 'yes'],
['core', 'shareapi_default_expire_date', 'no', 'no'],
['core', 'shareapi_expire_after_n_days', '7', '7'],
@ -202,7 +202,7 @@ class SharingTest extends TestCase {
'restrictUserEnumerationFullMatch' => 'yes',
'restrictUserEnumerationFullMatchUserId' => 'yes',
'restrictUserEnumerationFullMatchEmail' => 'yes',
'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no',
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
'enforceLinkPassword' => false,
'onlyShareWithGroupMembers' => false,
'shareAPIEnabled' => 'yes',

@ -124,7 +124,7 @@ EOF;
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match');
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_userid');
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_email');
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name');
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn');
$this->deleteServerConfig('core', 'shareapi_only_share_with_group_members');
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -95,7 +95,7 @@ class UserPlugin implements ISearchPlugin {
$this->shareeEnumerationFullMatch = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes';
$this->shareeEnumerationFullMatchUserId = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes';
$this->shareeEnumerationFullMatchEmail = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes';
$this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes';
$this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';
}
public function search($search, $limit, $offset, ISearchResult $searchResult) {

@ -1968,7 +1968,7 @@ class Manager implements IManager {
}
public function ignoreSecondDisplayName(): bool {
return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes';
return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';
}
public function currentUserCanEnumerateTargetUser(?IUser $currentUser, IUser $targetUser): bool {

@ -656,7 +656,7 @@ class UserPluginTest extends TestCase {
[
'core' => [
'shareapi_allow_share_dialog_user_enumeration' => 'no',
'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name' => 'yes',
'shareapi_restrict_user_enumeration_full_match_ignore_second_dn' => 'yes',
],
]
],

Loading…
Cancel
Save