]> source.dussan.org Git - nextcloud-server.git/commitdiff
Mail shares trigger the public key 2834/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 13 Apr 2017 13:14:30 +0000 (15:14 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 13 Apr 2017 13:19:23 +0000 (15:19 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/sharebymail/lib/ShareByMailProvider.php
apps/sharebymail/tests/ShareByMailProviderTest.php

index 0f4a8dd87bcea11432ec6249878522843cc2bb70..83170c5648cfceda19ade2629a529e89c5064307 100644 (file)
@@ -858,7 +858,7 @@ class ShareByMailProvider implements IShareProvider {
                $mail = $cursor->fetch() !== false;
                $cursor->closeCursor();
 
-               return ['mail' => $mail];
+               return ['public' => $mail];
        }
 
 }
index cd0600d3ae969c4285568c571e7f206a353c3cfe..13fb5d03bd8822c196c516ffaa710e8b9ca2b89e 100644 (file)
@@ -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();