Skip to content

Commit

Permalink
Merge pull request #35449 from owncloud/revert-35138-convert-share-wi…
Browse files Browse the repository at this point in the history
…th-tolowercase-inshare-api-stable10

Revert "[stable10] Backport of Convert shareWith to lower case"
  • Loading branch information
sharidas authored Jun 7, 2019
2 parents 619572c + d6e723b commit 782df3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 0 additions & 4 deletions apps/files_sharing/lib/Controller/Share20OcsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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));
Expand Down Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 782df3b

Please sign in to comment.