diff --git a/apps/files_sharing/lib/Controller/Share20OcsController.php b/apps/files_sharing/lib/Controller/Share20OcsController.php index a1923cf981c1..5ae97d70df00 100644 --- a/apps/files_sharing/lib/Controller/Share20OcsController.php +++ b/apps/files_sharing/lib/Controller/Share20OcsController.php @@ -386,10 +386,6 @@ public function createShare() { $globalAutoAccept = $this->config->getAppValue('core', 'shareapi_auto_accept_share', 'yes') === 'yes'; if ($shareType === Share::SHARE_TYPE_USER) { - //Lower the case if the share type is user - if (($shareWith !== null) && ($shareWith !== '')) { - $shareWith = \strtolower($shareWith); - } $userAutoAccept = false; if ($globalAutoAccept) { $userAutoAccept = $this->config->getUserValue($shareWith, 'files_sharing', 'auto_accept_share', 'yes') === 'yes'; diff --git a/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php b/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php index 533418670803..667501d7f36d 100644 --- a/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php +++ b/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php @@ -903,7 +903,7 @@ public function testCreateShareUser() { ->with('valid-path') ->willReturn($path); - $this->userManager->method('userExists')->with('validuser')->willReturn(true); + $this->userManager->method('userExists')->with('validUser')->willReturn(true); $path->expects($this->once()) ->method('lock') @@ -921,7 +921,7 @@ public function testCreateShareUser() { ~\OCP\Constants::PERMISSION_CREATE ) && $share->getShareType() === Share::SHARE_TYPE_USER && - $share->getSharedWith() === 'validuser' && + $share->getSharedWith() === 'validUser' && $share->getSharedBy() === 'currentUser'; })) ->will($this->returnArgument(0)); @@ -1587,7 +1587,7 @@ public function testCreateReshareOfFederatedMountNoDeletePermissions() { ->with('valid-path') ->willReturn($path); - $this->userManager->method('userExists')->with('validuser')->willReturn(true); + $this->userManager->method('userExists')->with('validUser')->willReturn(true); $this->shareManager ->expects($this->once()) diff --git a/tests/acceptance/features/apiShareManagementBasic/createShare.feature b/tests/acceptance/features/apiShareManagementBasic/createShare.feature index 874c76a1c030..56d43781795a 100644 --- a/tests/acceptance/features/apiShareManagementBasic/createShare.feature +++ b/tests/acceptance/features/apiShareManagementBasic/createShare.feature @@ -600,7 +600,7 @@ Feature: sharing Then the OCS status code should be "100" And the HTTP status code should be "200" And the fields of the last response should include - | share_with | user1 | + | share_with | USER1 | | file_target | /welcome.txt | | path | /welcome.txt | | permissions | 19 | diff --git a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature index 42abacc7e5b6..02d0de8214b3 100644 --- a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature @@ -329,7 +329,6 @@ Feature: Sharing files and folders with internal users When the user opens the share dialog for file "lorem.txt" Then the user should not be able to send the share notification by email using the webUI - @issue-35382 Scenario: user shares a file with another user with uppercase username Given user "user1" has been created with default attributes and skeleton files And these users have been created without skeleton files: @@ -339,5 +338,4 @@ Feature: Sharing files and folders with internal users When the user shares file "lorem.txt" with user "SomeUser" using the webUI And the user re-logs in as "SomeUser" using the webUI And the user browses to the shared-with-you page - Then file "lorem.txt" should not be listed on the webUI -# Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI