From 768b41ee45cc2a68ff63a6184db3e38298af0e92 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 27 Jun 2022 12:19:09 +0200 Subject: [PATCH] Rename setting name to reduce its length Signed-off-by: Louis Chemineau --- apps/settings/lib/Settings/Admin/Sharing.php | 2 +- apps/settings/tests/Settings/Admin/SharingTest.php | 8 ++++---- .../features/bootstrap/CollaborationContext.php | 2 +- lib/private/Collaboration/Collaborators/UserPlugin.php | 2 +- lib/private/Share20/Manager.php | 2 +- tests/lib/Collaboration/Collaborators/UserPluginTest.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index 58b3576e55bee..11c102e28034b 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -86,7 +86,7 @@ public function getForm() { '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(), 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(), 'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'), diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index d352636dbcc00..f69504b654a65 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -84,7 +84,7 @@ public function testGetFormWithoutExcludedGroups(): void { ['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'], @@ -120,7 +120,7 @@ public function testGetFormWithoutExcludedGroups(): void { 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', 'restrictUserEnumerationFullMatchEmail' => 'yes', - 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', + 'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, 'shareAPIEnabled' => 'yes', @@ -162,7 +162,7 @@ public function testGetFormWithExcludedGroups(): void { ['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'], @@ -198,7 +198,7 @@ public function testGetFormWithExcludedGroups(): void { 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', 'restrictUserEnumerationFullMatchEmail' => 'yes', - 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', + 'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, 'shareAPIEnabled' => 'yes', diff --git a/build/integration/features/bootstrap/CollaborationContext.php b/build/integration/features/bootstrap/CollaborationContext.php index 8f13e3f02f1c8..8deda86c2c33b 100644 --- a/build/integration/features/bootstrap/CollaborationContext.php +++ b/build/integration/features/bootstrap/CollaborationContext.php @@ -71,7 +71,7 @@ protected function resetAppConfigs(): void { $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'); } diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 49b7a3caac412..91e3a1ef49e99 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -95,7 +95,7 @@ public function __construct(IConfig $config, $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) { diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 0bf9093eca6bf..79b2e9e103a2d 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1920,7 +1920,7 @@ public function matchEmail(): bool { } 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 { diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index 2b7a08fe4e1ac..8987c8be6f677 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -657,7 +657,7 @@ public function dataSearchEnumeration() { [ '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', ], ] ],