Merge pull request #4883 from nextcloud/revert-4685-fix_4683
Revert "fix permissions of mountpoints - take 2"
This commit is contained in:
commit
75c437a96a
|
@ -207,11 +207,10 @@ class SharedStorageTest extends TestCase {
|
||||||
$this->assertTrue(\OC\Files\Filesystem::is_dir($this->folder));
|
$this->assertTrue(\OC\Files\Filesystem::is_dir($this->folder));
|
||||||
|
|
||||||
// for the share root we expect:
|
// for the share root we expect:
|
||||||
// the read permissions
|
// the read permissions (1)
|
||||||
// the delete permission, to enable unshare
|
// the delete permission (8), to enable unshare
|
||||||
// the update permission, to enable moving the share
|
|
||||||
$rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder);
|
$rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder);
|
||||||
$this->assertSame(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE, $rootInfo->getPermissions());
|
$this->assertSame(9, $rootInfo->getPermissions());
|
||||||
|
|
||||||
// for the file within the shared folder we expect:
|
// for the file within the shared folder we expect:
|
||||||
// the read permissions (1)
|
// the read permissions (1)
|
||||||
|
|
|
@ -1355,12 +1355,8 @@ class View {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($internalPath === '') {
|
if ($mount instanceof MoveableMount && $internalPath === '') {
|
||||||
if ($mount instanceof MoveableMount) {
|
$data['permissions'] |= \OCP\Constants::PERMISSION_DELETE;
|
||||||
$data['permissions'] = $data['permissions'] | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE;
|
|
||||||
} else {
|
|
||||||
$data['permissions'] = $data['permissions'] & (\OCP\Constants::PERMISSION_ALL - (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$owner = $this->getUserObjectForOwner($storage->getOwner($internalPath));
|
$owner = $this->getUserObjectForOwner($storage->getOwner($internalPath));
|
||||||
|
|
Loading…
Reference in New Issue