From 955635c7aaaf932c698069a08ff8f218f0ea990c Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 23 Jun 2016 15:43:21 +0200 Subject: Add explicit delete permission to link shares Link shares always allowed deletion, however internally the permissions were stored as 7 which lacked delete permissions. This created an inconsistency in the Webdav permissions. This fix makes sure we include delete permissions in the share permissions, which now become 15. In case a client is still passing 7 for legacy reasons, it gets converted automatically to 15. --- tests/lib/Share20/ManagerTest.php | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'tests') diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index a50ea6c892a..d2539f8577c 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -1318,24 +1318,6 @@ class ManagerTest extends \Test\TestCase { $this->invokePrivate($this->manager, 'linkCreateChecks', [$share]); } - /** - * @expectedException Exception - * @expectedExceptionMessage Link shares can't have delete permissions - */ - public function testLinkCreateChecksDeletePermissions() { - $share = $this->manager->newShare(); - - $share->setPermissions(\OCP\Constants::PERMISSION_DELETE); - - $this->config - ->method('getAppValue') - ->will($this->returnValueMap([ - ['core', 'shareapi_allow_links', 'yes', 'yes'], - ])); - - $this->invokePrivate($this->manager, 'linkCreateChecks', [$share]); - } - /** * @expectedException Exception * @expectedExceptionMessage Public upload not allowed -- cgit v1.2.3