Merge pull request #15063 from owncloud/share-readonlyfile-permissions
Do not automatically add "update" permission to shared mounts
This commit is contained in:
commit
7ea5c47b3c
|
@ -182,9 +182,8 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
|
||||||
// for the share root we expect:
|
// for the share root we expect:
|
||||||
// the shared permissions (1)
|
// the shared permissions (1)
|
||||||
// the delete permission (8), to enable unshare
|
// the delete permission (8), to enable unshare
|
||||||
// the update permission (2), to allow renaming of the mount point
|
|
||||||
$rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder);
|
$rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder);
|
||||||
$this->assertSame(11, $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 shared permissions (1)
|
// the shared permissions (1)
|
||||||
|
|
|
@ -1133,7 +1133,7 @@ class View {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mount instanceof MoveableMount && $internalPath === '') {
|
if ($mount instanceof MoveableMount && $internalPath === '') {
|
||||||
$data['permissions'] |= \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE;
|
$data['permissions'] |= \OCP\Constants::PERMISSION_DELETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
|
$data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
|
||||||
|
|
Loading…
Reference in New Issue