aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 15:14:30 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 15:19:23 +0200
commitcab41118f67e6a4743bac2cfcfa69a4bee28f2a3 (patch)
treeb3d0b233695841df1e3583bc294a25ea67010691 /apps/sharebymail
parent6a519abde8198914ab56c2fe61cd88e39e6f48e7 (diff)
downloadnextcloud-server-cab41118f67e6a4743bac2cfcfa69a4bee28f2a3.tar.gz
nextcloud-server-cab41118f67e6a4743bac2cfcfa69a4bee28f2a3.zip
Mail shares trigger the public key
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php2
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php32
2 files changed, 17 insertions, 17 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 0f4a8dd87bc..83170c5648c 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -858,7 +858,7 @@ class ShareByMailProvider implements IShareProvider {
$mail = $cursor->fetch() !== false;
$cursor->closeCursor();
- return ['mail' => $mail];
+ return ['public' => $mail];
}
}
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index cd0600d3ae9..13fb5d03bd8 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -676,11 +676,11 @@ class ShareByMailProviderTest extends TestCase {
$folder = $rootFolder->getUserFolder($u1->getUID())->newFolder('foo');
$accessList = $provider->getAccessList([$folder], true);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertFalse($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertFalse($accessList['public']);
$accessList = $provider->getAccessList([$folder], false);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertFalse($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertFalse($accessList['public']);
$share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com')
@@ -699,29 +699,29 @@ class ShareByMailProviderTest extends TestCase {
$share2 = $provider->create($share2);
$accessList = $provider->getAccessList([$folder], true);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertTrue($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertTrue($accessList['public']);
$accessList = $provider->getAccessList([$folder], false);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertTrue($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertTrue($accessList['public']);
$provider->delete($share2);
$accessList = $provider->getAccessList([$folder], true);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertTrue($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertTrue($accessList['public']);
$accessList = $provider->getAccessList([$folder], false);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertTrue($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertTrue($accessList['public']);
$provider->delete($share1);
$accessList = $provider->getAccessList([$folder], true);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertFalse($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertFalse($accessList['public']);
$accessList = $provider->getAccessList([$folder], false);
- $this->assertArrayHasKey('mail', $accessList);
- $this->assertFalse($accessList['mail']);
+ $this->assertArrayHasKey('public', $accessList);
+ $this->assertFalse($accessList['public']);
$u1->delete();
$u2->delete();